summaryrefslogtreecommitdiff
path: root/~coadde/cross-binutils
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-08-03 17:45:52 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2013-08-03 17:45:52 +0200
commit513c776d74c56a49781a09a5a772f4ea6d6bb401 (patch)
tree161509e3271db459f14f8c69de7c52d4902ba107 /~coadde/cross-binutils
parent8183144fe6e064d80985ac810f6178a3cf289d0d (diff)
parente191a289464c21aafe7478065ea7ed3ddda0766f (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/arm-elf-binutils/PKGBUILD community/bird/PKGBUILD community/cantata/PKGBUILD community/dbmail/PKGBUILD community/ekg2/PKGBUILD community/ffmpeg-compat/PKGBUILD community/gigedit/PKGBUILD community/gimp-refocus/PKGBUILD community/gmime24/PKGBUILD community/gmpc/PKGBUILD community/gnash/PKGBUILD community/id3lib-rcc/PKGBUILD community/linuxsampler/PKGBUILD community/lwm/PKGBUILD community/midori/PKGBUILD community/mplayer2/PKGBUILD community/mtpaint/PKGBUILD community/nestopia/PKGBUILD community/preload/PKGBUILD community/projectm/PKGBUILD community/rusxmms/PKGBUILD community/taglib-rcc/PKGBUILD community/the_silver_searcher/PKGBUILD community/xnee/PKGBUILD core/libgcrypt/PKGBUILD core/libusbx/PKGBUILD core/mkinitcpio-busybox/PKGBUILD extra/a2ps/PKGBUILD extra/a52dec/PKGBUILD extra/abook/PKGBUILD extra/avidemux/PKGBUILD extra/bzflag/PKGBUILD extra/cln/PKGBUILD extra/exempi/PKGBUILD extra/ffmpeg/PKGBUILD extra/fluxter/PKGBUILD extra/fontforge/PKGBUILD extra/glib/PKGBUILD extra/gnet/PKGBUILD extra/gnome-vfs/PKGBUILD extra/gnutls/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/gtk/PKGBUILD extra/idnkit/PKGBUILD extra/ilmbase/PKGBUILD extra/imake/PKGBUILD extra/kdenetwork/PKGBUILD extra/libdatrie/PKGBUILD extra/libmbim/PKGBUILD extra/libmp3splt/PKGBUILD extra/libqmi/PKGBUILD extra/libtxc_dxtn/PKGBUILD extra/libxfont/PKGBUILD extra/mesa/PKGBUILD extra/modemmanager/PKGBUILD extra/nedit/PKGBUILD extra/nmap/PKGBUILD extra/openexr/PKGBUILD extra/purple-plugin-pack/PKGBUILD extra/qemu/PKGBUILD extra/qtwebkit/PKGBUILD extra/subversion/PKGBUILD extra/transmission/PKGBUILD extra/truecrypt/PKGBUILD extra/vigra/PKGBUILD extra/virtuoso/PKGBUILD extra/vlc/PKGBUILD extra/wireshark/PKGBUILD extra/wxmaxima/PKGBUILD extra/x264/PKGBUILD extra/xorg-iceauth/PKGBUILD extra/xorg-mkfontscale/PKGBUILD extra/xorg-xfd/PKGBUILD libre/abuse-libre/PKGBUILD libre/clementine-libre/PKGBUILD libre/linux-libre/PKGBUILD
Diffstat (limited to '~coadde/cross-binutils')
-rw-r--r--~coadde/cross-binutils/PKGBUILD113
1 files changed, 69 insertions, 44 deletions
diff --git a/~coadde/cross-binutils/PKGBUILD b/~coadde/cross-binutils/PKGBUILD
index cb84cae3a..e1a8985f3 100644
--- a/~coadde/cross-binutils/PKGBUILD
+++ b/~coadde/cross-binutils/PKGBUILD
@@ -13,8 +13,7 @@
# | * | mipsel | mipsel | unknown | elf | no | bin/sys |
# | * | mips | mips | unknown | elf | no | bin/sys |
# | x86_64 | x86_64 | x86_64 | unknown | linux-gnu|gnu<|elf | yes | bin/sys |
-# | i[5-7]86 | i[5-7]86 | i[5-7]86 | pc | linux-gnu|gnu|elf | no | bin/sys |
-# | * | i486 | i486 | unknown | elf | no | bin/sys |
+# | i[5-7]86 | i[5-7]86 | i[5-7]86 | pc | linux-gnu|gnu| | no | bin/sys |
# | * | i386 | i386 | unknown | elf | no | bin/sys |
# | armv8-a | aarch64 | aarch64 | unknown | linux-gnu|elf | yes | - |
# | armv8-a | aarch64_be | aarch64_be | unknown | linux-gnu|elf | yes | - |
@@ -45,6 +44,17 @@
# | - | or32 | or32 | unknown | linux-gnu<|elf< | no | bin/sys |
# +-------------+-------------+-------------+----------+----------------------------------+-----------+---------+
+# For "DOSBox"
+# +-------------+-------------+-------------+----------+----------------------------------+-----------+---------+
+# | * | i386 | i386 | pc | msdosdjgpp | no | bin/sys |
+# +-------------+-------------+-------------+----------+----------------------------------+-----------+---------+
+
+# For "Wine"
+# +-------------+-------------+-------------+----------+----------------------------------+-----------+---------+
+# | * | x86_64 | x86_64 | unknown | mingw64 | yes | bin/sys |
+# | * | i386 | i386 | unknown | mingw32 | no | bin/sys |
+# +-------------+-------------+-------------+----------+----------------------------------+-----------+---------+
+
# * : Any supported by architecture.
# - : None.
# @ : bin/sys (Only sh4 and sh4l support)
@@ -57,47 +67,64 @@ _multilib_list=('mips64el' 'mips64' 'x86_64' 'aarch64' 'aarch64_be' 'sparc64' 'i
#---------------------------------------------------------------------------------------------------------------------------------------------
-_pkgname="binutils"
-
### Base FLAGS: ###
-_CARCH="x86_64"
+# For custom name.
+_pkgname="binutils"
+_pkgver="2.23.2"
+_pkgrel="2"
+# For binutils-common ("${_pkgname}-common${_pkgflag}${_verflag}") release.
+_pkgrelb="2"
+# For _target-binutils ("${_target}-${_pkgname}${_multilib_name}${_ath9k_htc_name}${_pkgflag}${_verflag}") release.
+_pkgrelc="2"
+# For older version.
+_add_version_name="no"
+# For custom pkg.
+_pkgflag=""
+
+### Architecture FLAGS: ###
+# CARCH flag
+_CARCH="mips64"
+# CHOST flags
_host="${_CARCH}"
_machine="unknown"
_system="linux-gnu"
-_multilib="no"
+# Multilib flag
+_multilib="yes"
### Patch FLAGS: ###
_patch_ath9k_htc_fw="no"
#---------------------------------------------------------------------------------------------------------------------------------------------
-_target="${_host}-${_machine}-${_system}"
+# For older version.
+[[ ${_add_version_name} == yes ]] && _verflag="-v${_pkgver}"
-# For "_multilib"
-[[ ${_multilib} == "yes" ]] && {
- _multilib_name="-multilib"
- _multilib_desc=" for multilib"
-}
-for _arch_multilib in ${_multilib_list[@]}; do
- [[ ${_CARCH} != ${_arch_multilib} ]] && _multilib="no"
-done
+# For Architecture.
+_target="${_host}-${_machine}-${_system}"
# For "_patch_ath9k_htc_fw"
+[[ ${_CARCH} != xtensa ]] && _patch_ath9k_htc_fw="no"
[[ ${_patch_ath9k_htc_fw} == "yes" ]] && {
_ath9k_htc_name="-ath9k-htc"
_ath9k_htc_desc=" adapted for ath9k-htc firmware"
_multilib="no"
}
-[[ ${_CARCH} != xtensa ]] && _patch_ath9k_htc_fw="no"
+
+# For "_multilib"
+[[ ${_CARCH} != $(echo ${_multilib_list[@]} | sed 's| |\n|g' | grep -x ${_CARCH}) ]] && _multilib="no"
+[[ ${_multilib} == "yes" ]] && {
+ _multilib_name="-multilib"
+ _multilib_desc=" for multilib"
+}
#---------------------------------------------------------------------------------------------------------------------------------------------
pkgname=(
- "${_target}-${_pkgname}${_multilib_name}${_ath9k_htc_name}"
- "${_pkgname}-common"
+ "${_target}-${_pkgname}${_multilib_name}${_ath9k_htc_name}${_pkgflag}${_verflag}"
+ "${_pkgname}-common${_pkgflag}${_verflag}"
)
-pkgver=2.23.2
-pkgrel=2
+pkgver=${_pkgver}
+pkgrel=${_pkgrel}
arch=("${_carch_list[@]}")
url="http://www.gnu.org/software/${_pkgname}/"
license=('GPL2')
@@ -142,13 +169,11 @@ build() {
cd ${srcdir}/${_pkgname}-build
[[ $CARCH != ${_CARCH} ]] && _TARGET="--target=${_target}"
- for _arch_multilib2 in ${_multilib_list[@]}; do
- if [[ ${_CARCH} == ${_arch_multilib2} ]]; then
- _LIB_PATH="--with-lib-path=/usr/lib:/usr/lib32:/usr/local/lib:/usr/local/lib32:/usr/${_target}/lib:/usr/${_target}/lib32"
- else
- _LIB_PATH="--with-lib-path=/usr/lib:/usr/local/lib:/usr/${_target}/lib"
- fi
- done
+ if [[ ${_CARCH} == $(echo ${_multilib_list[@]} | sed 's| |\n|g' | grep -x ${_CARCH}) ]]; then
+ _LIB_PATH="--with-lib-path=/usr/lib:/usr/lib32:/usr/local/lib:/usr/local/lib32:/usr/${_target}/lib:/usr/${_target}/lib32"
+ else
+ _LIB_PATH="--with-lib-path=/usr/lib:/usr/local/lib:/usr/${_target}/lib"
+ fi
if [[ ${_multilib} == "yes" ]]; then
_MULTILIB='--enable-multilib'
@@ -156,7 +181,7 @@ build() {
_MULTILIB='--disable-multilib'
fi
- ${srcdir}/${_pkgname}-${pkgver}/configure --prefix=/opt/${pkgname[0]}/${pkgver} \
+ ${srcdir}/${_pkgname}-${pkgver}/configure --prefix=/opt/${pkgname[0]/${_verflag}/}/${pkgver} \
$_TARGET $_LIB_PATH \
--program-prefix=${_target}- \
--program-suffix=${_multilib_name}${_ath9k_htc_name}-${pkgver} \
@@ -171,7 +196,7 @@ build() {
msg "Check the host environment and makes sure all the necessary tools are available"
make configure-host
- make tooldir=/opt/${pkgname[0]}/${pkgver}
+ make tooldir=/opt/${pkgname[0]/${_verflag}/}/${pkgver}
}
#---------------------------------------------------------------------------------------------------------------------------------------------
@@ -187,7 +212,7 @@ check() {
#---------------------------------------------------------------------------------------------------------------------------------------------
_target-binutils() {
- pkgrel=$pkgrel
+ pkgrel=${_pkgrelc}
pkgdesc="A set of programs to assemble and manipulate binary and object files${_multilib_desc}${_ath9k_htc_desc}. (${_target} architecture)"
depends=('glibc>=2.17' 'zlib' "${_pkgname}-common")
[[ $CHOST == ${_target} ]] && provides=("${_pkgname}=${pkgver}")
@@ -200,7 +225,7 @@ _target-binutils() {
install="${_target}-${_pkgname}${_multilib_name}${_ath9k_htc_name}.install"
cd ${srcdir}/${_pkgname}-build
- make prefix=${pkgdir}/opt/${pkgname}/${pkgver} tooldir=${pkgdir}/opt/${pkgname}/${pkgver} install
+ make prefix=${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver} tooldir=${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver} install
# temp #
msg "!!! Move 'bin', 'include' and 'share' dir to /usr, !!!"
@@ -215,8 +240,8 @@ _target-binutils() {
[[ $CARCH != ${_CARCH} ]] && {
msg "Move 'lib' files and directories, and remove architecture directories"
- mv -v ${pkgdir}/opt/${pkgname}/${pkgver}/{$CHOST/${_target}/lib/*,lib}
- rmdir -v ${pkgdir}/opt/${pkgname}/${pkgver}/$CHOST/{${_target}/{lib,},}
+ mv -v ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/{$CHOST/${_target}/lib/*,lib}
+ rmdir -v ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/$CHOST/{${_target}/{lib,},}
}
msg "Change lib-path on ldscripts files"
@@ -224,7 +249,7 @@ _target-binutils() {
/^SEARCH_DIR/ s|/${pkgver}/lib|/${pkgver}/lib32|g;
/^SEARCH_DIR/ s|/${pkgver}/lib3264|/${pkgver}/lib|g;
/^SEARCH_DIR/ s|/${pkgver}/lib32x32|/${pkgver}/lib|g;
- " ${pkgdir}/opt/${pkgname}/${pkgver}/lib/ldscripts/*
+ " ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/lib/ldscripts/*
_removebin=(ar as nm objcopy objdump ranlib strip)
for _rbin in ${_removebin[@]}; do
@@ -235,10 +260,10 @@ _target-binutils() {
msg "Create links for libraries"
install -vd ${pkgdir}/{usr/${_target},etc/ld.so.conf.d}
ln -vs ../lib ${pkgdir}/usr/${_target}/lib
- echo /opt/${pkgname}/${pkgver}/lib > ${pkgdir}/etc/ld.so.conf.d/${pkgname}-${pkgver}.conf
+ echo /opt/${pkgname/${_verflag}/}/${pkgver}/lib > ${pkgdir}/etc/ld.so.conf.d/${pkgname}-${pkgver}.conf
msg "Install PIC libiberty.a"
- install -vm644 libiberty/pic/libiberty.a ${pkgdir}/opt/${pkgname[0]}/${pkgver}/lib
+ install -vm644 libiberty/pic/libiberty.a ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/lib
msg "Remove unnecessaries manuals and create links for manuals"
_man=$(ls -1A ${pkgdir}/usr/share/man/man1)
@@ -348,34 +373,34 @@ package_or32-unknown-elf-binutils() { _target-binutils; }
#---------------------------------------------------------------------------------------------------------------------------------------------
package_binutils-common() {
- pkgrel=$pkgrel
+ pkgrel=${_pkgrelb}
pkgdesc="A set of programs to assemble and manipulate binary and object files. (headers, docs and locales files only)"
arch=('any')
depends=('linktools')
install="${_pkgname}.install"
cd ${srcdir}/${_pkgname}-build
- make prefix=${pkgdir}/opt/${pkgname}/${pkgver} tooldir=${pkgdir}/opt/${pkgname}/${pkgver} install
+ make prefix=${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver} tooldir=${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver} install
[[ $CARCH != ${_CARCH} ]] && {
msg "Move 'include' files and directories"
- mv -v ${pkgdir}/opt/${pkgname}/${pkgver}/{$CHOST/${_target}/include,}
+ mv -v ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/{$CHOST/${_target}/include,}
}
msg "Add some useful headers"
- install -vm644 ${srcdir}/${_pkgname}-${pkgver}/include/{demangle,libiberty}.h ${pkgdir}/opt/${pkgname}/${pkgver}/include
+ install -vm644 ${srcdir}/${_pkgname}-${pkgver}/include/{demangle,libiberty}.h ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/include
msg "Remove unnecessaries files and directories"
- rm -vr ${pkgdir}/opt/${pkgname}/${pkgver}/{bin,lib}
+ rm -vr ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/{bin,lib}
[[ $CARCH != ${_CARCH} ]] && {
- rm -vr ${pkgdir}/opt/${pkgname}/${pkgver}/$CHOST
+ rm -vr ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/$CHOST
}
msg "Rename manuals"
- _man=$(ls -1A ${pkgdir}/opt/${pkgname}/${pkgver}/share/man/man1)
+ _man=$(ls -1A ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/share/man/man1)
for _man_stage1 in ${_man[@]}; do
_man_stage2=${_man_stage1/${_multilib_name}${_ath9k_htc_name}-${pkgver}/}
_manuals=${_man_stage2/${_target}-/}
- mv -v ${pkgdir}/opt/${pkgname}/${pkgver}/share/man/man1/{${_man_stage1},${_manuals}}
+ mv -v ${pkgdir}/opt/${pkgname/${_verflag}/}/${pkgver}/share/man/man1/{${_man_stage1},${_manuals}}
done
}