Skip to content

Commit

Permalink
Ports: Use SERENITY_ARCH in --target/--host
Browse files Browse the repository at this point in the history
Recent ports already do this, let's update the others as well. One step
closer to multi-arch support for ports! :^)
  • Loading branch information
linusg authored and awesomekling committed Mar 13, 2021
1 parent 7cb9237 commit 4c49722
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func_defined pre_configure || pre_configure() {
}
func_defined configure || configure() {
chmod +x "${workdir}"/"$configscript"
run ./"$configscript" --host=i686-pc-serenity $configopts
run ./"$configscript" --host="${SERENITY_ARCH}-pc-serenity" $configopts
}
func_defined post_configure || post_configure() {
:
Expand Down
2 changes: 1 addition & 1 deletion Ports/binutils/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
port=binutils
version=2.32
useconfigure=true
configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --disable-werror --disable-gdb --disable-nls"
configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --disable-werror --disable-gdb --disable-nls"
files="https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz
https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz.sig binutils-${version}.tar.xz.sig
https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
Expand Down
4 changes: 2 additions & 2 deletions Ports/gcc/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
port=gcc
version=10.2.0
useconfigure=true
configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls --enable-shared --enable-default-pie --enable-host-shared"
configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls --enable-shared --enable-default-pie --enable-host-shared"
files="https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz
https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz.sig gcc-${version}.tar.xz.sig
https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
Expand All @@ -18,7 +18,7 @@ post_fetch() {

build() {
run make $makeopts
run find ./host-i686-pc-serenity/gcc/ -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
}

install() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/git/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ port=git
version=2.26.0
useconfigure="true"
files="https://mirrors.edge.kernel.org/pub/software/scm/git/git-${version}.tar.xz git-${version}.tar.xz"
configopts="--target=i686-pc-serenity CFLAGS=-DNO_IPV6"
configopts="--target=${SERENITY_ARCH}-pc-serenity CFLAGS=-DNO_IPV6"
depends="zlib"

build() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/jq/patches/diff.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index 7ffe373..3c8aae4 100755
basic_machine=we32k-att
;;
+ *serenity*)
+ basic_machine=i686-pc
+ basic_machine="${SERENITY_ARCH}-pc"
+ ;;
+
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
Expand Down
2 changes: 1 addition & 1 deletion Ports/make/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ http:https://ftp.gnu.org/gnu/make/make-${version}.tar.gz.sig make-${version}.tar.gz.si
https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
auth_type="sig"
auth_opts="--keyring ./gnu-keyring.gpg make-${version}.tar.gz.sig"
configopts="--target=i686-pc-serenity --with-sysroot=/ --without-guile"
configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --without-guile"
2 changes: 1 addition & 1 deletion Ports/nano/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version=4.5
useconfigure="true"
files="https://www.nano-editor.org/dist/v4/nano-${version}.tar.xz nano-${version}.tar.xz
https://www.nano-editor.org/dist/v4/nano-${version}.tar.xz.asc nano-${version}.tar.xz.asc"
configopts="--target=i686-pc-serenity --disable-browser --disable-utf8"
configopts="--target=${SERENITY_ARCH}-pc-serenity --disable-browser --disable-utf8"
depends="ncurses"
auth_type="sig"
auth_import_key="BFD009061E535052AD0DF2150D28D4D2A0ACE884"
Expand Down
2 changes: 1 addition & 1 deletion Ports/rsync/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version=3.1.3
useconfigure="true"
files="https://download.samba.org/pub/rsync/src/rsync-${version}.tar.gz rsync-${version}.tar.gz
https://download.samba.org/pub/rsync/src/rsync-${version}.tar.gz.asc rsync-${version}.tar.gz.asc"
configopts="--target=i686-pc-serenity"
configopts="--target=${SERENITY_ARCH}-pc-serenity"
6 changes: 5 additions & 1 deletion Ports/tinycc/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ useconfigure=true
makeopts=tcc

configure() {
run ./configure --cross-prefix=i686-pc-serenity- --cpu=i686 --triplet=i686-pc-serenity --crtprefix=/usr/lib
run ./configure \
--cross-prefix="${SERENITY_ARCH}-pc-serenity-" \
--cpu="${SERENITY_ARCH}" \
--triplet="${SERENITY_ARCH}-pc-serenity" \
--crtprefix=/usr/lib
}

export CONFIG_ldl=no

0 comments on commit 4c49722

Please sign in to comment.