[arch-commits] Commit in (5 files)

David Runge dvzrv at archlinux.org
Tue May 26 17:41:51 UTC 2020


    Date: Tuesday, May 26, 2020 @ 17:41:51
  Author: dvzrv
Revision: 387589

Adding gnu-efi (replacing/renaming gnu-efi-libs).

Added:
  gnu-efi/
  gnu-efi/repos/
  gnu-efi/trunk/
  gnu-efi/trunk/PKGBUILD
  gnu-efi/trunk/gnu-efi-3.0.12-ldflags.patch

------------------------------+
 PKGBUILD                     |   45 +++++++++++++++++++++++++++++++++++++++++
 gnu-efi-3.0.12-ldflags.patch |   12 ++++++++++
 2 files changed, 57 insertions(+)

Added: gnu-efi/trunk/PKGBUILD
===================================================================
--- gnu-efi/trunk/PKGBUILD	                        (rev 0)
+++ gnu-efi/trunk/PKGBUILD	2020-05-26 17:41:51 UTC (rev 387589)
@@ -0,0 +1,45 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=gnu-efi
+pkgver=3.0.12
+pkgrel=1
+pkgdesc="Develop EFI applications using the GNU toolchain and the EFI development environment"
+arch=('x86_64')
+url="https://sourceforge.net/projects/gnu-efi/"
+license=('BSD')
+conflicts=('gnu-efi-libs')
+provides=('gnu-efi-libs')
+replaces=('gnu-efi-libs')
+source=("https://download.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+        "${pkgname}-3.0.12-ldflags.patch")
+sha512sums=('cbec6f6e37271c22c71e3ce44d3579e48e7f3b797ec3946f56eb843ed3e472722763c566fc3b749f0c692ab6cb26e8909bb258cd164771a5b1eeff5c7cd51368'
+            '7fd1c8d09ff870c33ae62887b657a7367f85a07f6709d33471ca13117a08e755853fd1e99db492d1db47444b95ae871078c4a913ed70aa7236e49349046e06b6')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  # -Werror, not even once
+  sed -e 's/-Werror//g' -i Make.defaults
+  # insert LDFLFAGS into custom linker for apps
+  patch -Np1 -i "../${pkgname}-3.0.12-ldflags.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  make
+  make -C lib
+  make -C gnuefi
+  make -C inc
+  # unset LDFLAGS for custom linker used in apps, as we have patched our
+  # LDFLAGS in manually in prepare()
+  LDFLAGS=""
+  make -C apps
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make INSTALLROOT="$pkgdir/" PREFIX='/usr' install
+  install -vDm 644 apps/*.efi -t "${pkgdir}/usr/share/${pkgname}/apps/$CARCH"
+  install -vDm 644 README.efilib -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 {ChangeLog,README.{gnuefi,git,elilo}} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Added: gnu-efi/trunk/gnu-efi-3.0.12-ldflags.patch
===================================================================
--- gnu-efi/trunk/gnu-efi-3.0.12-ldflags.patch	                        (rev 0)
+++ gnu-efi/trunk/gnu-efi-3.0.12-ldflags.patch	2020-05-26 17:41:51 UTC (rev 387589)
@@ -0,0 +1,12 @@
+diff -ruN a/apps/Makefile b/apps/Makefile
+--- a/apps/Makefile	2020-05-11 17:05:20.000000000 +0200
++++ b/apps/Makefile	2020-05-26 00:32:48.470418674 +0200
+@@ -52,7 +52,7 @@
+ LDSCRIPT	= $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
+ endif
+ 
+-LDFLAGS		+= -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
++LDFLAGS		+= -O1 --sort-common --as-needed -z relro -z now -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
+ 
+ LOADLIBES	+= -lefi -lgnuefi
+ LOADLIBES	+= $(LIBGCC)


More information about the arch-commits mailing list