first commit
[scm/bb/meta-tizen.git] / recipes-tizen / xorg-cf-files / xorg-cf-files.inc
1 DESCRIPTION = "Data files for the imake utility"
2 HOMEPAGE = "http://xorg.freedesktop.org/"
3 SECTION = "Development/Tools/Building"
4 LICENSE = "MIT"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by xorg-cf-files 
13 PROVIDES += "xorg-cf-files"
14 RPROVIDES_xorg-cf-files += "xorg-cf-files"
15
16 RDEPENDS = ""
17 #RDEPENDS of xorg-cf-files (${PN})
18 RDEPENDS_${PN} += "gccmakedep"
19 RDEPENDS_${PN} += "makedepend"
20 RDEPENDS_${PN} += "imake"
21
22
23 DEPENDS = ""
24 #DEPENDS of xorg-cf-files 
25 DEPENDS += "font-util"
26 DEPENDS += "pkgconfig(xorg-macros)"
27
28 do_patch() {
29  chmod -Rf a+rX,u+w,g-w,o-w ${S}
30  #setup -q
31  cp ${S}/packaging/xorg-cf-files.manifest .
32  cat > host.def << EOF
33  #define ConfigDir /usr/share/X11/config
34  #define XAppLoadDir /usr/share/X11/app-defaults
35  #define UseSeparateConfDir NO
36  #define ManPath /usr/share/man
37  #define ModuleDir /usr/lib/xorg/modules
38  #ifdef  i386Architecture
39  #undef  DefaultGcc2i386Opt
40  #define DefaultGcc2i386Opt      -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
41  #endif
42  #ifdef  MipsArchitecture
43  #undef  DefaultGcc2MipsOpt
44  #define DefaultGcc2MipsOpt      -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
45  #endif
46  #ifdef  PpcArchitecture
47  #undef  DefaultGcc2PpcOpt
48  #define DefaultGcc2PpcOpt       -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
49  #endif
50  #ifdef  Ppc64Architecture
51  #undef  DefaultGcc2Ppc64Opt
52  #define DefaultGcc2Ppc64Opt     -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
53  #endif
54  #ifdef  AMD64Architecture
55  #undef  DefaultGcc2AMD64Opt
56  #define DefaultGcc2AMD64Opt     -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
57  #endif
58  #ifdef  s390xArchitecture
59  #undef  OptimizedCDebugFlags
60  #define OptimizedCDebugFlags    -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
61  #endif
62  #ifdef  ia64Architecture
63  #undef  OptimizedCDebugFlags
64  #define OptimizedCDebugFlags    -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
65  #endif
66  #if defined(SparcArchitecture) || defined(Sparc64Architecture)
67  #undef  OptimizedCDebugFlags
68  #define OptimizedCDebugFlags    -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing
69  # undef HaveLib64
70  #if defined(Sparc64Architecture)
71  # define HaveLib64    YES
72  #else
73  # define HaveLib64    NO
74  #endif
75  #endif
76  EOF
77  
78  
79 }
80
81 do_configure() {
82 }
83
84 do_compile() {
85  LANG=C
86  export LANG
87  unset DISPLAY
88  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
89  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
90  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
91  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
92  
93  
94    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
95    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
96    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
97    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
98          --target=noarch-tizen-linux \
99          --program-prefix= \
100          --prefix=/usr \
101          --exec-prefix=/usr \
102          --bindir=/usr/bin \
103          --sbindir=/usr/sbin \
104          --sysconfdir=/etc \
105          --datadir=/usr/share \
106          --includedir=/usr/include \
107          --libdir=/usr/lib \
108          --libexecdir=/usr/libexec \
109          --localstatedir=/var \
110          --sharedstatedir=/usr/com \
111          --mandir=/usr/share/man \
112          --infodir=/usr/share/info --with-config-dir=/usr/share/X11/config
113  make -j16
114  
115  
116  
117 }
118
119 do_install() {
120  echo export RPM_BUILD_ROOT=${D}
121  LANG=C
122  export LANG
123  unset DISPLAY
124  rm -rf ${D} 
125  mkdir -p ${D} 
126  
127  
128    oe_runmake \
129          DESTDIR=${D} \
130          INSTALL_ROOT=${D} \
131          BINDIR=/usr/bin \
132    install  
133    rm -f ${D}/usr/share/info/dir 
134    find ${D} -regex ".*\.la$" | xargs rm -f -- 
135    find ${D} -regex ".*\.a$" | xargs rm -f --
136  
137  
138 }
139
140 PACKAGES = ""
141 PACKAGES += "xorg-cf-files"
142
143 xorg-cf-files_files = ""
144 xorg-cf-files_files += "xorg-cf-files.manifest"
145 xorg-cf-files_files += "ChangeLog COPYING README"
146 xorg-cf-files_files += "/usr/share/X11"
147 xorg-cf-files_files += "/usr/share/X11/config/"
148
149 FILES_${PN} = "${xorg-cf-files_files}"
150
151 PKG_xorg-cf-files= "xorg-cf-files"
152
153 require xorg-cf-files-extraconf.inc