Last active
March 13, 2022 16:43
-
-
Save Javyre/2578176bf09638733c08586e654fb04d to your computer and use it in GitHub Desktop.
Minimal libgccjit xbps template for x86-64 glibc (and dirty first sketch of gccemacs template)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_majorver=9 | |
_minorver=${_majorver}.3 | |
pkgname=libgccjit | |
version=${_minorver}.0 | |
revision=6 | |
short_desc="GCC Just In Time Compiler" | |
maintainer="Enno Boland <[email protected]>" | |
homepage="http://gcc.gnu.org" | |
license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later" | |
distfiles="${GNU_SITE}/gcc/gcc-${version}/gcc-${version}.tar.xz" | |
checksum="71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1" | |
wrksrc="gcc-${version}" | |
hostmakedepends="tar texinfo perl flex" | |
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel" | |
depends="binutils libgcc-devel-${version}_${revision} | |
libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision} | |
glibc-devel" | |
_triplet="x86_64-unknown-linux-gnu" | |
do_configure() { | |
local _args | |
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 | |
sed -i 's/lib64/lib/' gcc/config/i386/linux64.h | |
export CPPFLAGS="$CPPFLAGS -O2" | |
export CFLAGS="${CFLAGS//-fPIC/}" | |
export CXXFLAGS="${CXXFLAGS//-fPIC/}" | |
export LDFLAGS="${LDFLAGS//-fPIC/}" | |
export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib" | |
_args=" --build=${_triplet}" | |
_args+=" --prefix=/usr" | |
_args+=" --mandir=/usr/share/man" | |
_args+=" --infodir=/usr/share/info" | |
_args+=" --libexecdir=/usr/lib" | |
_args+=" --libdir=/usr/lib" | |
_args+=" --with-system-zlib" | |
_args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" | |
_args+=" --with-linker-hash-style=gnu" | |
_args+=" --enable-host-shared" | |
_args+=" --enable-shared" | |
_args+=" --enable-checking=release" | |
_args+=" --enable-languages=jit" | |
_args+=" --enable-linker-build-id" | |
_args+=" --enable-checking=release" | |
_args+=" --disable-multilib" | |
_args+=" --disable-bootstrap" | |
_args+=" --disable-libssp" | |
_args+=" --disable-lto" | |
_args+=" --disable-libquadmath" | |
_args+=" --disable-liboffloadmic" | |
_args+=" --disable-libada" | |
_args+=" --disable-libsanitizer" | |
_args+=" --disable-libquadmath-support" | |
_args+=" --disable-libgomp" | |
_args+=" --disable-libvtv" | |
_args+=" --disable-libsanitize" | |
mkdir -p build | |
cd build | |
CONFIG_SHELL=/bin/bash \ | |
${wrksrc}/configure ${_args} | |
} | |
do_build() { | |
cd build | |
make ${makejobs} | |
} | |
do_install() { | |
cd build/gcc | |
vmkdir usr/lib | |
ln -sfr ${DESTDIR}/usr/lib ${DESTDIR}/usr/lib64 | |
make DESTDIR=${DESTDIR} jit.install-common | |
rm ${DESTDIR}/usr/lib64 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Template file for 'emacs' | |
pkgname=emacs | |
version=27.1 | |
revision=1 | |
build_style=gnu-configure | |
configure_args="--with-file-notification=inotify --with-modules | |
$(vopt_with jpeg) $(vopt_with tiff) $(vopt_with gif) $(vopt_with png) | |
$(vopt_with xpm) $(vopt_with svg rsvg) $(vopt_with imagemagick) | |
$(vopt_with xml xml2) $(vopt_with gnutls) $(vopt_with sound) $(vopt_with m17n m17n-flt) | |
$(vopt_with json) $(vopt_with harfbuzz) $(vopt_with cairo) $(vopt_with gmp libgmp)" | |
hostmakedepends="pkg-config tar" | |
makedepends="ncurses-devel libXaw-devel gtk+-devel gtk+3-devel webkit2gtk-devel | |
dbus-devel acl-devel autoconf texinfo libgccjit | |
$(vopt_if jpeg libjpeg-turbo-devel) $(vopt_if tiff tiff-devel) | |
$(vopt_if gif giflib-devel) $(vopt_if png libpng-devel) $(vopt_if xpm libXpm-devel) | |
$(vopt_if svg librsvg-devel) $(vopt_if imagemagick libmagick-devel) | |
$(vopt_if xml libxml2-devel) $(vopt_if gnutls gnutls-devel) | |
$(vopt_if sound alsa-lib-devel) $(vopt_if m17n m17n-lib-devel) | |
$(vopt_if json jansson-devel) $(vopt_if harfbuzz harfbuzz-devel) | |
$(vopt_if cairo cairo-devel) $(vopt_if gmp gmp-devel)" | |
depends="emacs-common-${version}_${revision}" | |
short_desc="GNU Emacs editor" | |
maintainer="Leah Neukirchen <[email protected]>" | |
license="GPL-3.0-or-later" | |
homepage="http://www.gnu.org/software/emacs/" | |
# distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" | |
# checksum=4a4c128f915fc937d61edfc273c98106711b540c9be3cd5d2e2b9b5b2f172e41 | |
distfiles="https://github.com/emacs-mirror/emacs/archive/feature/native-comp.tar.gz" | |
checksum=9f387592b16bc048287656a562819792c5d08acbf5b979a30fe9a0a4fa398b0e | |
wrksrc=emacs-feature-native-comp | |
replaces="emacs>=0" | |
nocross=yes | |
nopie=yes | |
# Package build options | |
build_options="jpeg tiff gif png xpm svg xml imagemagick gnutls sound m17n dbus json harfbuzz cairo gmp" | |
desc_option_xpm="Enable support for XPM images" | |
desc_option_sound="Enable support for sound" | |
desc_option_m17n="Enable support for m17n multilingual text processing" | |
build_options_default="jpeg tiff gif png xpm svg xml gnutls sound m17n json gmp" | |
pre_configure() { | |
# Just configuring in different directories results in | |
# spurious emacs rebuilds with incompatible build numbers. | |
mkdir -p nox | |
mv * nox || true | |
cp -a nox x11 | |
cp -a nox gtk2 | |
cp -a nox gtk3 | |
cp -a nox gtk3-nativecomp | |
} | |
do_configure() { | |
# cd $wrksrc/nox | |
# ./configure --without-x $(vopt_with dbus) ${configure_args} | |
# cd $wrksrc/x11 | |
# ./configure --with-x-toolkit=athena --without-toolkit-scroll-bars \ | |
# $(vopt_with dbus) --without-gconf --without-gsettings \ | |
# ${configure_args} | |
# cd $wrksrc/gtk2 | |
# ./configure --with-x-toolkit=gtk2 ${configure_args} | |
# cd $wrksrc/gtk3 | |
# ./configure --with-x-toolkit=gtk3 --with-xwidgets ${configure_args} | |
cd $wrksrc/gtk3-nativecomp | |
[ -x configure ] || ./autogen.sh | |
./configure --with-x-toolkit=gtk3 --with-xwidgets --with-nativecomp \ | |
CFLAGS="-O3 -mtune=native -march=native -fomit-frame-pointer" \ | |
${configure_args} | |
} | |
do_build() { | |
# make ${makejobs} -C nox | |
# make ${makejobs} -C x11 | |
# make ${makejobs} -C gtk2 | |
# make ${makejobs} -C gtk3 | |
make ${makejobs} -C gtk3-nativecomp | |
} | |
do_install() { | |
make DESTDIR=$DESTDIR -C ${wrksrc}/gtk3-nativecomp install | |
rm -f ${DESTDIR}/usr/bin/ctags | |
rm -f ${DESTDIR}/usr/lib/systemd/user/emacs.service | |
rm -f ${DESTDIR}/usr/share/man/man1/ctags.1* | |
rm -f ${DESTDIR}/usr/share/info/info.info | |
rm -rf ${DESTDIR}/usr/share/applications | |
rm -rf ${DESTDIR}/usr/share/icons | |
} | |
emacs-common_package() { | |
short_desc+=" - common files" | |
archs=noarch | |
pkg_install() { | |
vmove usr/share/emacs | |
vmove usr/share/man | |
vmove usr/share/info | |
rm -f ${PKGDESTDIR}/usr/share/info/info.info.gz | |
} | |
} | |
# emacs-x11_package() { | |
# depends="emacs-common-${version}_${revision}" | |
# provides="emacs-${version}_${revision}" | |
# replaces="emacs>=0" | |
# short_desc+=" - X11 version" | |
# pkg_install() { | |
# make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/x11 install | |
# rm -f ${PKGDESTDIR}/usr/bin/ctags | |
# rm -rf ${PKGDESTDIR}/usr/share | |
# rm -rf ${PKGDESTDIR}/usr/lib | |
# } | |
# } | |
# emacs-gtk2_package() { | |
# depends="emacs-common-${version}_${revision} desktop-file-utils hicolor-icon-theme" | |
# provides="emacs-${version}_${revision}" | |
# replaces="emacs>=0" | |
# short_desc+=" - GTK+2 version" | |
# pkg_install() { | |
# make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk2 install | |
# rm -f ${PKGDESTDIR}/usr/bin/ctags | |
# rm -rf ${PKGDESTDIR}/usr/share/{emacs,man,info} | |
# rm -rf ${PKGDESTDIR}/usr/lib | |
# } | |
# } | |
# emacs-gtk3_package() { | |
# depends="emacs-common-${version}_${revision} desktop-file-utils hicolor-icon-theme" | |
# provides="emacs-${version}_${revision}" | |
# replaces="emacs>=0" | |
# short_desc+=" - GTK+3 version" | |
# pkg_install() { | |
# make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk3 install | |
# rm -f ${PKGDESTDIR}/usr/bin/ctags | |
# rm -rf ${PKGDESTDIR}/usr/share/{emacs,man,info} | |
# rm -rf ${PKGDESTDIR}/usr/lib | |
# } | |
# } | |
emacs-gtk3-nativecomp_package() { | |
depends="emacs-common-${version}_${revision} desktop-file-utils hicolor-icon-theme libgccjit" | |
provides="emacs-${version}_${revision}" | |
replaces="emacs>=0" | |
short_desc+=" - GTK+3 version" | |
pkg_install() { | |
make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk3-nativecomp install | |
rm -f ${PKGDESTDIR}/usr/bin/ctags | |
rm -rf ${PKGDESTDIR}/usr/share/{emacs,man,info} | |
rm -rf ${PKGDESTDIR}/usr/lib | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for the libgccjit template should I update the version to my installed version of gcc or leave as is?