823 |
823 |
824 # switch into a temporary build area |
824 # switch into a temporary build area |
825 cd openpkg-%{version} |
825 cd openpkg-%{version} |
826 . ./.buildenv |
826 . ./.buildenv |
827 |
827 |
|
828 # force usage of proper architecture parameter |
|
829 bitopt= |
|
830 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
|
831 amd64-* ) bitopt=-m64 ;; |
|
832 ia64-* ) bitopt=-m64 ;; |
|
833 sparc64-* ) bitopt=-m64 ;; |
|
834 esac |
|
835 |
828 # display verbosity header |
836 # display verbosity header |
829 set +x; VERBOSE "BUILD: Build GNU bash (Bourne-Again Shell)"; set -x |
837 set +x; VERBOSE "BUILD: Build GNU bash (Bourne-Again Shell)"; set -x |
830 |
838 |
831 # build GNU bash tool |
839 # build GNU bash tool |
832 ( cd bash-%{V_bash} |
840 ( cd bash-%{V_bash} |
868 # display verbosity header |
876 # display verbosity header |
869 set +x; VERBOSE "BUILD: Build GNU bzip2 (Compression Library)"; set -x |
877 set +x; VERBOSE "BUILD: Build GNU bzip2 (Compression Library)"; set -x |
870 |
878 |
871 # build BZIP2 library |
879 # build BZIP2 library |
872 ( cd bzip2-%{V_bzip2} |
880 ( cd bzip2-%{V_bzip2} |
873 ${l_make} CC="${l_cc}" CFLAGS="-O" libbz2.a bzip2 || exit $? |
881 ${l_make} CC="${l_cc}" CFLAGS="$bitopt -O" libbz2.a bzip2 || exit $? |
874 ( echo "# libbz2.la - a libtool library file" |
882 ( echo "# libbz2.la - a libtool library file" |
875 echo "# Generated by ltmain.sh - GNU libtool x.x.x" |
883 echo "# Generated by ltmain.sh - GNU libtool x.x.x" |
876 echo "dlname=''" |
884 echo "dlname=''" |
877 echo "library_names=''" |
885 echo "library_names=''" |
878 echo "old_library='libbz2.a'" |
886 echo "old_library='libbz2.a'" |
891 # display verbosity header |
899 # display verbosity header |
892 set +x; VERBOSE "BUILD: Build Zlib (Compression Library)"; set -x |
900 set +x; VERBOSE "BUILD: Build Zlib (Compression Library)"; set -x |
893 |
901 |
894 # build ZLIB library |
902 # build ZLIB library |
895 ( cd zlib-%{V_zlib} |
903 ( cd zlib-%{V_zlib} |
896 CC="${l_cc}" CFLAGS="-O" ./configure |
904 CC="${l_cc}" CFLAGS="$bitopt -O" ./configure |
897 ${l_make} CC="${l_cc}" libz.a || exit $? # intentionally do not pass CFLAGS here |
905 ${l_make} CC="${l_cc}" libz.a || exit $? # intentionally do not pass CFLAGS here |
898 ) || exit $? |
906 ) || exit $? |
899 |
907 |
900 # display verbosity header |
908 # display verbosity header |
901 set +x; VERBOSE "BUILD: Build XZ (Compression Library)"; set -x |
909 set +x; VERBOSE "BUILD: Build XZ (Compression Library)"; set -x |
905 opts="" |
913 opts="" |
906 case "$plid" in |
914 case "$plid" in |
907 Darwin/* ) opts="--disable-assembler" ;; |
915 Darwin/* ) opts="--disable-assembler" ;; |
908 esac |
916 esac |
909 CC="${l_cc}" \ |
917 CC="${l_cc}" \ |
910 CFLAGS="-O" \ |
918 CFLAGS="$bitopt -O" \ |
911 ./configure \ |
919 ./configure \ |
912 --prefix=%{l_prefix} \ |
920 --prefix=%{l_prefix} \ |
913 --libdir="%{l_prefix}/lib" \ |
921 --libdir="%{l_prefix}/lib" \ |
914 --mandir=%{l_prefix}/man \ |
922 --mandir=%{l_prefix}/man \ |
915 --without-libiconv-prefix \ |
923 --without-libiconv-prefix \ |
992 -e 's;test "$OSTYPE" = msdosdjgpp;true;' \ |
1001 -e 's;test "$OSTYPE" = msdosdjgpp;true;' \ |
993 util/point.sh |
1002 util/point.sh |
994 sh $shtool subst \ |
1003 sh $shtool subst \ |
995 -e "1s;^.*\$;#!$l_perl;" \ |
1004 -e "1s;^.*\$;#!$l_perl;" \ |
996 Configure `find . -name "*.pl" -print` |
1005 Configure `find . -name "*.pl" -print` |
|
1006 sh $shtool subst \ |
|
1007 -e 's;xarch=amd64;m64;g' \ |
|
1008 Configure |
997 opts="" |
1009 opts="" |
998 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
1010 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
999 *-solaris* ) opts="-lnsl -lsocket" ;; |
1011 *-solaris* ) opts="-lnsl -lsocket" ;; |
1000 esac |
1012 esac |
1001 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
1013 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
1015 ) || exit $? |
1027 ) || exit $? |
1016 |
1028 |
1017 # build BSD libarchive |
1029 # build BSD libarchive |
1018 ( cd libarchive-%{V_libarchive} |
1030 ( cd libarchive-%{V_libarchive} |
1019 CC="${l_cc}" \ |
1031 CC="${l_cc}" \ |
1020 CFLAGS="-O -D_POSIX_PTHREAD_SEMANTICS" \ |
1032 CFLAGS="$bitopt -O -D_POSIX_PTHREAD_SEMANTICS" \ |
1021 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib} -I`pwd`/../bzip2-%{V_bzip2} -I`pwd`/../xz-%{V_xz}/src/liblzma/api -I`pwd`/../openssl-%{V_openssl}/include" \ |
1033 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib} -I`pwd`/../bzip2-%{V_bzip2} -I`pwd`/../xz-%{V_xz}/src/liblzma/api -I`pwd`/../openssl-%{V_openssl}/include" \ |
1022 LDFLAGS="-L`pwd`/../zlib-%{V_zlib} -L`pwd`/../bzip2-%{V_bzip2} -L`pwd`/../xz-%{V_xz}/src/liblzma/.libs -L`pwd`/../openssl-%{V_openssl}" \ |
1034 LDFLAGS="$bitopt -L`pwd`/../zlib-%{V_zlib} -L`pwd`/../bzip2-%{V_bzip2} -L`pwd`/../xz-%{V_xz}/src/liblzma/.libs -L`pwd`/../openssl-%{V_openssl}" \ |
1023 GREP="grep" \ |
1035 GREP="grep" \ |
1024 ./configure \ |
1036 ./configure \ |
1025 --prefix=%{l_prefix} \ |
1037 --prefix=%{l_prefix} \ |
1026 --libdir="%{l_prefix}/lib" \ |
1038 --libdir="%{l_prefix}/lib" \ |
1027 --enable-bsdtar \ |
1039 --enable-bsdtar \ |
1040 ) || exit $? |
1052 ) || exit $? |
1041 |
1053 |
1042 # build GNU diffutils |
1054 # build GNU diffutils |
1043 ( cd diffutils-%{V_diffutils} |
1055 ( cd diffutils-%{V_diffutils} |
1044 CC="${l_cc}" \ |
1056 CC="${l_cc}" \ |
1045 CFLAGS="-O" \ |
1057 CFLAGS="$bitopt -O" \ |
1046 ./configure \ |
1058 ./configure \ |
1047 --prefix=%{l_prefix} \ |
1059 --prefix=%{l_prefix} \ |
1048 --disable-nls |
1060 --disable-nls |
1049 ${l_make} || exit $? |
|
1050 ( mv src/diff src/diff3 src/sdiff src/cmp .. |
1061 ( mv src/diff src/diff3 src/sdiff src/cmp .. |
1051 ${l_make} clean || true |
1062 ${l_make} clean || true |
1052 mv ../diff ../diff3 ../sdiff ../cmp . |
1063 mv ../diff ../diff3 ../sdiff ../cmp . |
1053 ) || exit $? |
1064 ) || exit $? |
1054 ) || exit $? |
1065 ) || exit $? |
1061 ( echo 'ac_cv_header_openssl_engine_h=no' |
1072 ( echo 'ac_cv_header_openssl_engine_h=no' |
1062 echo 'lt_cv_prog_compiler_c_o_F77=no' |
1073 echo 'lt_cv_prog_compiler_c_o_F77=no' |
1063 echo 'lt_cv_sys_max_cmd_len=100' |
1074 echo 'lt_cv_sys_max_cmd_len=100' |
1064 ) >config.cache |
1075 ) >config.cache |
1065 CC="${l_cc}" \ |
1076 CC="${l_cc}" \ |
1066 CFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1077 CFLAGS="$bitopt -I`pwd`/../zlib-%{V_zlib}" \ |
1067 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1078 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1068 LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ |
1079 LDFLAGS="$bitopt -L`pwd`/../zlib-%{V_zlib}" \ |
1069 GREP="grep" \ |
1080 GREP="grep" \ |
1070 ./configure \ |
1081 ./configure \ |
1071 --cache-file=./config.cache \ |
1082 --cache-file=./config.cache \ |
1072 --libdir="%{l_prefix}/lib" \ |
1083 --libdir="%{l_prefix}/lib" \ |
1073 --without-libidn \ |
1084 --without-libidn \ |
1112 echo 'ac_cv_have_dev_audio=no' |
1124 echo 'ac_cv_have_dev_audio=no' |
1113 echo 'ac_cv_func_gettimeofday=yes' |
1125 echo 'ac_cv_func_gettimeofday=yes' |
1114 echo 'bc_cv_as_noexecstack=no' |
1126 echo 'bc_cv_as_noexecstack=no' |
1115 ) >config.cache |
1127 ) >config.cache |
1116 CC="${l_cc}" \ |
1128 CC="${l_cc}" \ |
1117 CFLAGS="-O" \ |
1129 CFLAGS="$bitopt -O" \ |
1118 ./configure \ |
1130 ./configure \ |
1119 --cache-file=./config.cache \ |
1131 --cache-file=./config.cache \ |
1120 --prefix=%{l_prefix} \ |
1132 --prefix=%{l_prefix} \ |
1121 --libdir="%{l_prefix}/lib" \ |
1133 --libdir="%{l_prefix}/lib" \ |
1122 --with-cpu=none \ |
1134 --with-cpu=none \ |
1137 set +x; VERBOSE "BUILD: Build POPT (Option Parsing Library)"; set -x |
1149 set +x; VERBOSE "BUILD: Build POPT (Option Parsing Library)"; set -x |
1138 |
1150 |
1139 # build POPT library |
1151 # build POPT library |
1140 ( cd popt-%{V_popt} |
1152 ( cd popt-%{V_popt} |
1141 CC="${l_cc}" \ |
1153 CC="${l_cc}" \ |
|
1154 CFLAGS="$bitopt -O" \ |
1142 CPPFLAGS="-DOPENPKG -DPOPT_fprintf=fprintf" \ |
1155 CPPFLAGS="-DOPENPKG -DPOPT_fprintf=fprintf" \ |
1143 GREP="grep" \ |
1156 GREP="grep" \ |
1144 ./configure \ |
1157 ./configure \ |
1145 --prefix=%{l_prefix} \ |
1158 --prefix=%{l_prefix} \ |
1146 --libdir="%{l_prefix}/lib" \ |
1159 --libdir="%{l_prefix}/lib" \ |
1156 set +x; VERBOSE "BUILD: Build SQLite (RDBMS Library)"; set -x |
1169 set +x; VERBOSE "BUILD: Build SQLite (RDBMS Library)"; set -x |
1157 |
1170 |
1158 # build SQLite library |
1171 # build SQLite library |
1159 ( cd sqlite-%{V_sqlite} |
1172 ( cd sqlite-%{V_sqlite} |
1160 CC="${l_cc}" \ |
1173 CC="${l_cc}" \ |
|
1174 CFLAGS="$bitopt -O" \ |
1161 LIBS="-lm" \ |
1175 LIBS="-lm" \ |
1162 GREP="grep" \ |
1176 GREP="grep" \ |
1163 ./configure \ |
1177 ./configure \ |
1164 --prefix=%{l_prefix} \ |
1178 --prefix=%{l_prefix} \ |
1165 --libdir="%{l_prefix}/lib" \ |
1179 --libdir="%{l_prefix}/lib" \ |
1311 |
1325 |
1312 # build "mutex" executable |
1326 # build "mutex" executable |
1313 ${l_make} -f `SOURCE mutex.mk` \ |
1327 ${l_make} -f `SOURCE mutex.mk` \ |
1314 CC="${l_cc}" \ |
1328 CC="${l_cc}" \ |
1315 CPPFLAGS="-Ipopt-%{V_popt}" \ |
1329 CPPFLAGS="-Ipopt-%{V_popt}" \ |
1316 LDFLAGS="-Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ |
1330 LDFLAGS="$bitopt -Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ |
1317 MUTEX_DOT_C="`SOURCE mutex.c`" |
1331 MUTEX_DOT_C="`SOURCE mutex.c`" |
1318 |
1332 |
1319 %install |
1333 %install |
1320 # skip in bootstrap phase 2 (see openpkg.boot) |
1334 # skip in bootstrap phase 2 (see openpkg.boot) |
1321 [ ".$OPENPKG_BOOT" = .1 ] && exit 0 |
1335 [ ".$OPENPKG_BOOT" = .1 ] && exit 0 |