Skip to content

Commit

Permalink
Fixing homebrew build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
plk committed Jan 4, 2024
1 parent 1e6484f commit b4f9402
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions dist/build-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# build-universal.sh <release> <branch> <binaryname> <justbuild> <deletescancache> <codesign>
#
# ./build-universal.sh development dev biber 0 0 1
#
#
# <release> is a SF subdir of /home/frs/project/biblatex-biber/
# <branch> is a git branch to checkout on the build farm servers
# <binaryname> is the name of the biber binary to use for the release.
Expand Down Expand Up @@ -35,13 +35,13 @@ cd $BASE
git checkout $BRANCH
git pull
perl ./Build.PL
sudo ./Build installdeps
sudo ./Build install
./Build installdeps
./Build install
cd $BINDIR/darwin_arm64
$SCANCACHE./build.sh
~/bin/pp_osx_codesign_fix biber-darwin_arm64
cd $BASE
sudo ./Build realclean
./Build realclean

cd $BINDIR/darwin_arm64
\rm -rf biber-darwin_arm64.tar.gz
Expand All @@ -56,12 +56,12 @@ echo "Downloading x86_64 binary ... make sure it's the one you want"
\rm -rf biber-darwin_universal.tar.gz
\rm -rf biber-darwin_x86_64.tar.gz
\rm -rf $BINARYNAME
/opt/local/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/binaries/MacOS/biber-darwin_x86_64.tar.gz -O biber-darwin_x86_64.tar.gz
gnutar zxf biber-darwin_x86_64.tar.gz
/opt/homebrew/bin/wget --content-disposition --level=0 -c https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/$RELEASE/binaries/MacOS/biber-darwin_x86_64.tar.gz -O biber-darwin_x86_64.tar.gz
gtar zxf biber-darwin_x86_64.tar.gz
mv $BINARYNAME biber-darwin_x86_64
/usr/bin/lipo -create -output $BINARYNAME biber-darwin_x86_64 biber-darwin_arm64
chmod +x $BINARYNAME
gnutar cf biber-darwin_universal.tar $BINARYNAME
gtar cf biber-darwin_universal.tar $BINARYNAME
gzip biber-darwin_universal.tar
\rm biber-darwin_arm*
\rm biber-darwin_x86_64*
Expand Down
20 changes: 10 additions & 10 deletions dist/darwin_arm64/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
# by looking to see if there is a site_perl directory for the module. If there is, we use that
# version.

declare -r perlv='5.36'
declare ucpath="/opt/local/lib/perl5/${perlv}/Unicode/Collate"
export PATH=/opt/local/libexec/perl${perlv}/sitebin:$PATH
declare -r perlv='5.38.0'
declare ucpath="/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/${perlv%.0}/Unicode/Collate"

# Unicode::Collate has a site_perl version so has been updated since this
# perl was released
if [ -d "/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/Unicode/Collate" ]

if [ -d "/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/site_perl/${perlv%.0}/Unicode/Collate" ]
then
ucpath="/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/Unicode/Collate"
ucpath="/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/site_perl/${perlv%.0}/Unicode/Collate"
fi

echo "USING Unicode::Collate at: ${ucpath}"

cp /opt/local/libexec/perl${perlv}/sitebin/biber /tmp/biber-darwin
cp /opt/homebrew/Cellar/perl/${perlv}/bin/biber /tmp/biber-darwin

PAR_VERBATIM=1 pp \
--module=deprecate \
Expand All @@ -55,7 +55,7 @@ PAR_VERBATIM=1 pp \
--module=DateTime \
--link=/opt/local/lib/libz.1.dylib \
--link=/opt/local/lib/libiconv.2.dylib \
--link=/opt/local/libexec/perl${perlv}/sitebin/libbtparse.dylib \
--link=/opt/homebrew/Cellar/perl/${perlv}/lib/libbtparse.dylib \
--link=/opt/local/lib/libxml2.2.dylib \
--link=/opt/local/lib/libxslt.1.dylib \
--link=/opt/local/lib/libgdbm.6.dylib \
Expand All @@ -78,9 +78,9 @@ PAR_VERBATIM=1 pp \
--addfile="${ucpath}/CJK;lib/Unicode/Collate/CJK;lib/Unicode/Collate/CJK" \
--addfile="${ucpath}/allkeys.txt;lib/Unicode/Collate/allkeys.txt" \
--addfile="${ucpath}/keys.txt;lib/Unicode/Collate/keys.txt" \
--addfile="/opt/local/lib/perl5/site_perl/${perlv}/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem" \
--addfile="/opt/local/lib/perl5/site_perl/${perlv}/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml" \
--addfile="/opt/local/lib/perl5/site_perl/${perlv}/darwin-thread-multi-2level/auto/Unicode/LineBreak/LineBreak.bundle;lib/auto/Unicode/LineBreak/LineBreak.bundle" \
--addfile="/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/site_perl/${perlv%.0}/Mozilla/CA/cacert.pem;lib/Mozilla/CA/cacert.pem" \
--addfile="/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/site_perl/${perlv%.0}/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml" \
--addfile="/opt/homebrew/Cellar/perl/${perlv}/lib/perl5/site_perl/${perlv%.0}/darwin-thread-multi-2level/auto/Unicode/LineBreak/LineBreak.bundle;lib/auto/Unicode/LineBreak/LineBreak.bundle" \
--cachedeps=scancache \
--output=biber-darwin_arm64 \
/tmp/biber-darwin
Expand Down

0 comments on commit b4f9402

Please sign in to comment.