summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Bruguera Micó2024-01-01 21:42:58 +0000
committerJoan Bruguera Micó2024-01-01 21:42:58 +0000
commite59bc4579eff8a92cb78e22ef63d3788724d3d86 (patch)
treee3adfa9be93c4b00d0629eae8820af4d8db47955
parent37c9fe38831964f9a82184d2347abde4d47c2567 (diff)
downloadaur-e59bc4579eff8a92cb78e22ef63d3788724d3d86.tar.gz
Honor SOURCE_DATE_EPOCH for reproducible builds.
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch45
-rw-r--r--0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch25
-rw-r--r--PKGBUILD21
4 files changed, 92 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 649087b6fb3a..1768853c6f57 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,16 @@
pkgbase = dimemas
pkgdesc = High-abstracted network simulator for message-passing programs (from BSC).
pkgver = 5.4.2.20210310
- pkgrel = 2
+ pkgrel = 3
url = https://www.bsc.es/discover-bsc/organisation/scientific-structure/performance-tools
arch = x86_64
license = LGPL2.1
depends = boost
source = https://ftp.tools.bsc.es/dimemas/dimemas-5.4.2-src.tar.bz2
+ source = 0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch
+ source = 0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch
sha512sums = 5fe41152c583d2d4bc08ab939f9ca5f7599a4dc414cc6445db2fecf13093322f9f6ab9ef84411337fe9e3854bef40181830bc9a7e5319d86deb3fc1c0d0061d4
+ sha512sums = 87a5cbb5282dfb283668073ae7f925a7e3ccedb7162cab7423e3a9e089d4503122a5842b1ca3be40c3a17c4ac639ecbb4bd832fa03b694721ce9322421e42fce
+ sha512sums = 4a72a6d8816310887c41a13946292f1dfa5b92768cd53cd1076700f3660b841fd82559a6f1e8f24c70711d487f6f5ab66ab33e20f0ea0bd18e5eeb6ea7341b48
pkgname = dimemas
diff --git a/0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch b/0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch
new file mode 100644
index 000000000000..cb1827e48136
--- /dev/null
+++ b/0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch
@@ -0,0 +1,45 @@
+From 7cecf788d029241b50aabfb886767ad5b1e03000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
+Date: Mon, 1 Jan 2024 21:40:03 +0000
+Subject: [PATCH] Enable Lex noyywrap option so no LEXLIB is needed.
+
+Fixes the build with regenerated ./configure. Seems related to:
+- https://lists.fedorahosted.org/archives/list/pam-developers@lists.fedorahosted.org/thread/4T5ZGPKGHHYOQFAOBFJO7J7SIFZLQARP/
+- https://bugs.archlinux.org/task/79780
+---
+ Simulator/input/lex.l | 2 ++
+ configure.ac | 5 -----
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Simulator/input/lex.l b/Simulator/input/lex.l
+index 885864c..8d91a02 100644
+--- a/Simulator/input/lex.l
++++ b/Simulator/input/lex.l
+@@ -32,6 +32,8 @@
+
+ \* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+
++%option noyywrap
++
+ %{
+ char lex_l_rcsid[]="$Id$";
+ #include <stddef.h>
+diff --git a/configure.ac b/configure.ac
+index 8b0d0b8..9eeccf1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,11 +152,6 @@ if test -z "$YACC"; then
+ ac_cv_errcount=$((ac_cv_errcount + 1))
+ fi
+
+-if test -z "$LEXLIB"; then
+- AC_MSG_WARN(flex or lex not found. Please install flex before continuing)
+- ac_cv_errcount=$((ac_cv_errcount + 1))
+-fi
+-
+ if test $ac_cv_errcount -gt 0; then
+ AC_MSG_ERROR("Critical packages are missing and compilation will fail. Please
+ install the packages listed above and rerun ./configure")
+--
+2.43.0
+
diff --git a/0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch b/0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch
new file mode 100644
index 000000000000..e7362aa63b54
--- /dev/null
+++ b/0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch
@@ -0,0 +1,25 @@
+From f523d53cf9428e667bacc449892a8e5bef7f290c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
+Date: Mon, 1 Jan 2024 21:40:38 +0000
+Subject: [PATCH] Honor SOURCE_DATE_EPOCH for reproducible builds.
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9eeccf1..ea1f62d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ AM_INIT_AUTOMAKE([tar-ustar subdir-objects no-dependencies])
+ AC_PREFIX_DEFAULT(${DIMEMASDIR:-/usr/local})
+ AC_CONFIG_MACRO_DIR([m4])
+
+-AC_DEFINE_UNQUOTED(DATE, ["`date`"], [Current date of compilation] )
++AC_DEFINE_UNQUOTED(DATE, ["`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"`"], [Current date of compilation] )
+ #AM_SILENT_RULES([yes])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+--
+2.43.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 3035b15fe565..7300ec192f19 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,26 @@
pkgname='dimemas'
pkgdesc='High-abstracted network simulator for message-passing programs (from BSC).'
pkgver='5.4.2.20210310'
-pkgrel='2'
+pkgrel='3'
arch=('x86_64')
url='https://www.bsc.es/discover-bsc/organisation/scientific-structure/performance-tools'
license=('LGPL2.1')
depends=(boost)
-source=("https://ftp.tools.bsc.es/$pkgname/$pkgname-${pkgver%.*}-src.tar.bz2")
-sha512sums=(5fe41152c583d2d4bc08ab939f9ca5f7599a4dc414cc6445db2fecf13093322f9f6ab9ef84411337fe9e3854bef40181830bc9a7e5319d86deb3fc1c0d0061d4)
+source=("https://ftp.tools.bsc.es/$pkgname/$pkgname-${pkgver%.*}-src.tar.bz2"
+ "0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch"
+ "0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch")
+sha512sums=(5fe41152c583d2d4bc08ab939f9ca5f7599a4dc414cc6445db2fecf13093322f9f6ab9ef84411337fe9e3854bef40181830bc9a7e5319d86deb3fc1c0d0061d4
+ 87a5cbb5282dfb283668073ae7f925a7e3ccedb7162cab7423e3a9e089d4503122a5842b1ca3be40c3a17c4ac639ecbb4bd832fa03b694721ce9322421e42fce
+ 4a72a6d8816310887c41a13946292f1dfa5b92768cd53cd1076700f3660b841fd82559a6f1e8f24c70711d487f6f5ab66ab33e20f0ea0bd18e5eeb6ea7341b48)
+
+prepare() {
+ cd "$srcdir/$pkgname-${pkgver%.*}"
+
+ patch -Np1 -i "$srcdir/0001-Enable-Lex-noyywrap-option-so-no-LEXLIB-is-needed.patch"
+ patch -Np1 -i "$srcdir/0001-Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch"
+
+ autoreconf -i -f
+}
build() {
cd "$srcdir/$pkgname-${pkgver%.*}"
@@ -25,4 +38,4 @@ package() {
cd "$srcdir/$pkgname-${pkgver%.*}"
make DESTDIR="$pkgdir/" install
-} \ No newline at end of file
+}