821 |
821 |
822 # switch into a temporary build area |
822 # switch into a temporary build area |
823 cd openpkg-%{version} |
823 cd openpkg-%{version} |
824 . ./.buildenv |
824 . ./.buildenv |
825 |
825 |
826 # force usage of proper architecture parameter |
|
827 bitopt= |
|
828 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
|
829 amd64-* ) bitopt=-m64 ;; |
|
830 ia64-* ) bitopt=-m64 ;; |
|
831 sparc64-* ) bitopt=-m64 ;; |
|
832 esac |
|
833 |
|
834 # display verbosity header |
826 # display verbosity header |
835 set +x; VERBOSE "BUILD: Build GNU bash (Bourne-again Shell)"; set -x |
827 set +x; VERBOSE "BUILD: Build GNU bash (Bourne-again Shell)"; set -x |
836 |
828 |
837 # build GNU bash tool |
829 # build GNU bash tool |
838 ( cd bash-%{V_bash} |
830 ( cd bash-%{V_bash} |
874 # display verbosity header |
864 # display verbosity header |
875 set +x; VERBOSE "BUILD: Build GNU bzip2 (Compression Library)"; set -x |
865 set +x; VERBOSE "BUILD: Build GNU bzip2 (Compression Library)"; set -x |
876 |
866 |
877 # build BZIP2 library |
867 # build BZIP2 library |
878 ( cd bzip2-%{V_bzip2} |
868 ( cd bzip2-%{V_bzip2} |
879 ${l_make} CC="${l_cc}" CFLAGS="$bitopt -O" libbz2.a bzip2 || exit $? |
869 ${l_make} CC="${l_cc}" CFLAGS="-O" libbz2.a bzip2 || exit $? |
880 ( echo "# libbz2.la - a libtool library file" |
870 ( echo "# libbz2.la - a libtool library file" |
881 echo "# Generated by ltmain.sh - GNU libtool x.x.x" |
871 echo "# Generated by ltmain.sh - GNU libtool x.x.x" |
882 echo "dlname=''" |
872 echo "dlname=''" |
883 echo "library_names=''" |
873 echo "library_names=''" |
884 echo "old_library='libbz2.a'" |
874 echo "old_library='libbz2.a'" |
897 # display verbosity header |
887 # display verbosity header |
898 set +x; VERBOSE "BUILD: Build Zlib (Compression Library)"; set -x |
888 set +x; VERBOSE "BUILD: Build Zlib (Compression Library)"; set -x |
899 |
889 |
900 # build ZLIB library |
890 # build ZLIB library |
901 ( cd zlib-%{V_zlib} |
891 ( cd zlib-%{V_zlib} |
902 CC="${l_cc}" CFLAGS="$bitopt -O" ./configure |
892 CC="${l_cc}" CFLAGS="-O" ./configure |
903 ${l_make} CC="${l_cc}" libz.a || exit $? # intentionally do not pass CFLAGS here |
893 ${l_make} CC="${l_cc}" libz.a || exit $? # intentionally do not pass CFLAGS here |
904 ) || exit $? |
894 ) || exit $? |
905 |
895 |
906 # display verbosity header |
896 # display verbosity header |
907 set +x; VERBOSE "BUILD: Build XZ (Compression Library)"; set -x |
897 set +x; VERBOSE "BUILD: Build XZ (Compression Library)"; set -x |
911 opts="" |
901 opts="" |
912 case "$plid" in |
902 case "$plid" in |
913 Darwin/* ) opts="--disable-assembler" ;; |
903 Darwin/* ) opts="--disable-assembler" ;; |
914 esac |
904 esac |
915 CC="${l_cc}" \ |
905 CC="${l_cc}" \ |
916 CFLAGS="$bitopt -O" \ |
906 CFLAGS="-O" \ |
917 ./configure \ |
907 ./configure \ |
918 --prefix=%{l_prefix} \ |
908 --prefix=%{l_prefix} \ |
919 --libdir="%{l_prefix}/lib" \ |
909 --libdir="%{l_prefix}/lib" \ |
920 --mandir=%{l_prefix}/man \ |
910 --mandir=%{l_prefix}/man \ |
921 --without-libiconv-prefix \ |
911 --without-libiconv-prefix \ |
990 set +x; VERBOSE "BUILD: Build OpenSSL (Crypography and SSL/TLS Toolkit)"; set -x |
979 set +x; VERBOSE "BUILD: Build OpenSSL (Crypography and SSL/TLS Toolkit)"; set -x |
991 |
980 |
992 # build OpenSSL toolkit |
981 # build OpenSSL toolkit |
993 ( cd openssl-%{V_openssl} |
982 ( cd openssl-%{V_openssl} |
994 sh $shtool subst \ |
983 sh $shtool subst \ |
|
984 -e 's;-m64 *;;g' \ |
|
985 -e 's;-xarch=amd64 *;;g' \ |
995 -e 's;-m486;-march=i486;g' \ |
986 -e 's;-m486;-march=i486;g' \ |
996 -e 's;BN_LLONG *;;' \ |
987 -e 's;BN_LLONG *;;' \ |
997 Configure |
988 Configure |
998 sh $shtool subst \ |
989 sh $shtool subst \ |
999 -e 's;test "$OSTYPE" = msdosdjgpp;true;' \ |
990 -e 's;test "$OSTYPE" = msdosdjgpp;true;' \ |
1000 util/point.sh |
991 util/point.sh |
1001 sh $shtool subst \ |
992 sh $shtool subst \ |
1002 -e "1s;^.*\$;#!$l_perl;" \ |
993 -e "1s;^.*\$;#!$l_perl;" \ |
1003 Configure `find . -name "*.pl" -print` |
994 Configure `find . -name "*.pl" -print` |
1004 sh $shtool subst \ |
|
1005 -e 's;xarch=amd64;m64;g' \ |
|
1006 Configure |
|
1007 opts="" |
995 opts="" |
1008 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
996 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
1009 *-solaris* ) opts="-lnsl -lsocket" ;; |
997 *-solaris* ) opts="-lnsl -lsocket" ;; |
1010 esac |
998 esac |
1011 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
999 case `sh $shtool platform -n -L -S "" -C "+" -F "%<ap>-%<sp>"` in |
1028 ( cd libarchive-%{V_libarchive} |
1016 ( cd libarchive-%{V_libarchive} |
1029 sh $shtool subst \ |
1017 sh $shtool subst \ |
1030 -e 's;\(AM_CFLAGS =\) -Wall;\1;' \ |
1018 -e 's;\(AM_CFLAGS =\) -Wall;\1;' \ |
1031 Makefile.in |
1019 Makefile.in |
1032 CC="${l_cc}" \ |
1020 CC="${l_cc}" \ |
1033 CFLAGS="$bitopt -O -D_POSIX_PTHREAD_SEMANTICS" \ |
1021 CFLAGS="-O -D_POSIX_PTHREAD_SEMANTICS" \ |
1034 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 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" \ |
1035 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 LDFLAGS="-L`pwd`/../zlib-%{V_zlib} -L`pwd`/../bzip2-%{V_bzip2} -L`pwd`/../xz-%{V_xz}/src/liblzma/.libs -L`pwd`/../openssl-%{V_openssl}" \ |
1036 GREP="grep" \ |
1024 GREP="grep" \ |
1037 ./configure \ |
1025 ./configure \ |
1038 --prefix=%{l_prefix} \ |
1026 --prefix=%{l_prefix} \ |
1039 --libdir="%{l_prefix}/lib" \ |
1027 --libdir="%{l_prefix}/lib" \ |
1040 --enable-bsdtar \ |
1028 --enable-bsdtar \ |
1053 ) || exit $? |
1041 ) || exit $? |
1054 |
1042 |
1055 # build GNU diffutils |
1043 # build GNU diffutils |
1056 ( cd diffutils-%{V_diffutils} |
1044 ( cd diffutils-%{V_diffutils} |
1057 CC="${l_cc}" \ |
1045 CC="${l_cc}" \ |
1058 CFLAGS="$bitopt -O" \ |
1046 CFLAGS="-O" \ |
1059 ./configure \ |
1047 ./configure \ |
1060 --prefix=%{l_prefix} \ |
1048 --prefix=%{l_prefix} \ |
1061 --disable-nls |
1049 --disable-nls |
1062 touch man/diff.1 man/diff3.1 && ${l_make} || exit $? |
1050 touch man/diff.1 man/diff3.1 && ${l_make} || exit $? |
1063 ( mv src/diff src/diff3 src/sdiff src/cmp .. |
1051 ( mv src/diff src/diff3 src/sdiff src/cmp .. |
1074 ( echo 'ac_cv_header_openssl_engine_h=no' |
1062 ( echo 'ac_cv_header_openssl_engine_h=no' |
1075 echo 'lt_cv_prog_compiler_c_o_F77=no' |
1063 echo 'lt_cv_prog_compiler_c_o_F77=no' |
1076 echo 'lt_cv_sys_max_cmd_len=100' |
1064 echo 'lt_cv_sys_max_cmd_len=100' |
1077 ) >config.cache |
1065 ) >config.cache |
1078 CC="${l_cc}" \ |
1066 CC="${l_cc}" \ |
1079 CFLAGS="$bitopt -I`pwd`/../zlib-%{V_zlib}" \ |
1067 CFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1080 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1068 CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ |
1081 LDFLAGS="$bitopt -L`pwd`/../zlib-%{V_zlib}" \ |
1069 LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ |
1082 GREP="grep" \ |
1070 GREP="grep" \ |
1083 ./configure \ |
1071 ./configure \ |
1084 --cache-file=./config.cache \ |
1072 --cache-file=./config.cache \ |
1085 --libdir="%{l_prefix}/lib" \ |
1073 --libdir="%{l_prefix}/lib" \ |
1086 --without-libidn \ |
1074 --without-libidn \ |
1126 echo 'ac_cv_have_dev_audio=no' |
1114 echo 'ac_cv_have_dev_audio=no' |
1127 echo 'ac_cv_func_gettimeofday=yes' |
1115 echo 'ac_cv_func_gettimeofday=yes' |
1128 echo 'bc_cv_as_noexecstack=no' |
1116 echo 'bc_cv_as_noexecstack=no' |
1129 ) >config.cache |
1117 ) >config.cache |
1130 CC="${l_cc}" \ |
1118 CC="${l_cc}" \ |
1131 CFLAGS="$bitopt -O" \ |
1119 CFLAGS="-O" \ |
1132 ./configure \ |
1120 ./configure \ |
1133 --cache-file=./config.cache \ |
1121 --cache-file=./config.cache \ |
1134 --prefix=%{l_prefix} \ |
1122 --prefix=%{l_prefix} \ |
1135 --libdir="%{l_prefix}/lib" \ |
1123 --libdir="%{l_prefix}/lib" \ |
1136 --with-cpu=none \ |
1124 --with-cpu=none \ |
1151 set +x; VERBOSE "BUILD: Build POPT (Option Parsing Library)"; set -x |
1139 set +x; VERBOSE "BUILD: Build POPT (Option Parsing Library)"; set -x |
1152 |
1140 |
1153 # build POPT library |
1141 # build POPT library |
1154 ( cd popt-%{V_popt} |
1142 ( cd popt-%{V_popt} |
1155 CC="${l_cc}" \ |
1143 CC="${l_cc}" \ |
1156 CFLAGS="$bitopt -O" \ |
1144 CFLAGS="-O" \ |
1157 CPPFLAGS="-DOPENPKG -DPOPT_fprintf=fprintf" \ |
1145 CPPFLAGS="-DOPENPKG -DPOPT_fprintf=fprintf" \ |
1158 GREP="grep" \ |
1146 GREP="grep" \ |
1159 ./configure \ |
1147 ./configure \ |
1160 --prefix=%{l_prefix} \ |
1148 --prefix=%{l_prefix} \ |
1161 --libdir="%{l_prefix}/lib" \ |
1149 --libdir="%{l_prefix}/lib" \ |
1171 set +x; VERBOSE "BUILD: Build SQLite (RDBMS Library)"; set -x |
1159 set +x; VERBOSE "BUILD: Build SQLite (RDBMS Library)"; set -x |
1172 |
1160 |
1173 # build SQLite library |
1161 # build SQLite library |
1174 ( cd sqlite-%{V_sqlite} |
1162 ( cd sqlite-%{V_sqlite} |
1175 CC="${l_cc}" \ |
1163 CC="${l_cc}" \ |
1176 CFLAGS="$bitopt -O" \ |
1164 CFLAGS="-O" \ |
1177 LIBS="-lm" \ |
1165 LIBS="-lm" \ |
1178 GREP="grep" \ |
1166 GREP="grep" \ |
1179 ./configure \ |
1167 ./configure \ |
1180 --prefix=%{l_prefix} \ |
1168 --prefix=%{l_prefix} \ |
1181 --libdir="%{l_prefix}/lib" \ |
1169 --libdir="%{l_prefix}/lib" \ |
1346 |
1334 |
1347 # build "mutex" executable |
1335 # build "mutex" executable |
1348 ${l_make} -f `SOURCE mutex.mk` \ |
1336 ${l_make} -f `SOURCE mutex.mk` \ |
1349 CC="${l_cc}" \ |
1337 CC="${l_cc}" \ |
1350 CPPFLAGS="-Ipopt-%{V_popt}" \ |
1338 CPPFLAGS="-Ipopt-%{V_popt}" \ |
1351 LDFLAGS="$bitopt -Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ |
1339 LDFLAGS="-Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ |
1352 MUTEX_DOT_C="`SOURCE mutex.c`" |
1340 MUTEX_DOT_C="`SOURCE mutex.c`" |
1353 |
1341 |
1354 %install |
1342 %install |
1355 # skip in bootstrap phase 2 (see openpkg.boot) |
1343 # skip in bootstrap phase 2 (see openpkg.boot) |
1356 [ ".$OPENPKG_BOOT" = .1 ] && exit 0 |
1344 [ ".$OPENPKG_BOOT" = .1 ] && exit 0 |