#! /bin/bash # GObject Introspection # Source: https://download.gnome.org/sources/gobject-introspection/1.80/gobject-introspection-1.80.1.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: Glib # Recommended: NONE # Optional: Cairo, Gjs, GTK-Doc # If optimizing, use these flags export CFLAGS="-march=native -mtune=native -pipe " export CFLAGS+="-O3 -Ofast -falign-functions=32 " export CFLAGS+="-ffat-lto-objects -flto=auto -fno-semantic-interposition " export CFLAGS+="-mprefer-vector-width=256 " export CXXFLAGS=$CFLAGS export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed " meson setup --prefix=/usr OUT read -p "Compile?" && ninja -C OUT -j2 && sudo -S DESTDIR=$BUILD ninja -C OUT install && sudo -S mkdir -pv /BMAN/install sudo -S mkdir -pv /BMAN/usr/share sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ # Install missing files for g in GLib-2.0 GModule-2.0 GObject-2.0 Gio-2.0 do sudo cp -v OUT/gir/${g}.typelib $BUILD/usr/lib/girepository-1.0/ sudo cp -v OUT/gir/${g}.gir $BUILD/usr/share/gir-1.0/ done cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| gobject-introspection: gobject-introspection (GObject interface introspection library) gobject-introspection: gobject-introspection: GObject Introspection is a project for providing machine readable gobject-introspection: introspection data of the API of C libraries. This introspection data gobject-introspection: can be used for automatic code generation for bindings, API gobject-introspection: verification, and documentation generation. gobject-introspection: gobject-introspection: For more information, check out: gobject-introspection: http://live.gnome.org/GObjectIntrospection gobject-introspection: gobject-introspection: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/gobject-introspection-1.80.1-$PSUFFIX && cd /BMAN cat > /tmp/slack-desc << "EOF" gobject-introspection-doc: Manuals for GObject interface introspection library gobject-introspection-doc: gobject-introspection-doc: GObject Introspection is a project for providing machine readable gobject-introspection-doc: introspection data of the API of C libraries. This introspection data gobject-introspection-doc: can be used for automatic code generation for bindings, API gobject-introspection-doc: verification, and documentation generation. gobject-introspection-doc: gobject-introspection-doc: For more information, check out: gobject-introspection-doc: http://live.gnome.org/GObjectIntrospection gobject-introspection-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/gobject-introspection-doc-1.80.1-$NOPSUFFUX sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*