Date: Tuesday, November 29, 2022 @ 07:08:31
  Author: grawlinson
Revision: 1354981

upgpkg:ft2-clone 1.62-1; new upstream release

* New upstream release.
* Use patch instead of blindly trusting sed.
  Hint: sed fails silently.

Added:
  ft2-clone/trunk/templatify-build-date.patch
Modified:
  ft2-clone/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   22 ++++++++++++++--------
 templatify-build-date.patch |   21 +++++++++++++++++++++
 2 files changed, 35 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-11-29 05:42:42 UTC (rev 1354980)
+++ PKGBUILD    2022-11-29 07:08:31 UTC (rev 1354981)
@@ -3,7 +3,7 @@
 # Contributor: Alex Gentilucci <[email protected]>
 
 pkgname=ft2-clone
-pkgver=1.61
+pkgver=1.62
 pkgrel=1
 pkgdesc='Portable Fasttracker II clone'
 arch=('x86_64')
@@ -25,9 +25,13 @@
   'cmake'
   'gendesk'
 )
-_commit='3af99afd1fb732d735c34c02c926ca4d7ba5b061'
-source=("$pkgname::git+https://github.com/8bitbubsy/ft2-clone#commit=$_commit";)
-b2sums=('SKIP')
+_commit='fde50d93b2284178743a12e8c359286ea99f0b21'
+source=(
+  "$pkgname::git+https://github.com/8bitbubsy/ft2-clone#commit=$_commit";
+  'templatify-build-date.patch'
+)
+b2sums=('SKIP'
+        
'c983881cf54bab2e643bebedb8aa933605e7bf5e76b13a5ff26e2727ac14f6748b40351aee64b2672c752a42273f581f69bf35ef82fef8555a141e569be97b53')
 
 pkgver() {
   cd "$pkgname"
@@ -53,10 +57,12 @@
 
   # attempt repro build by using commit date as build date
   local commit_date="$(git show --no-patch --format=%cd --date=format:'%d %B 
%Y')"
-  sed \
-    -e "/PROG_VER_STR/a #define PROG_VER_DATE \"$commit_date\"" \
-    -i src/ft2_header.h
-  sed -e 's/__DATE__/PROG_VER_DATE/' -i src/ft2_about.c
+
+  # apply template
+  patch -p1 -i "$srcdir/templatify-build-date.patch"
+
+  # patch in commit date
+  sed -e "s/@DATE@/$commit_date/" -i src/ft2_header.h
 }
 
 build() {

Added: templatify-build-date.patch
===================================================================
--- templatify-build-date.patch                         (rev 0)
+++ templatify-build-date.patch 2022-11-29 07:08:31 UTC (rev 1354981)
@@ -0,0 +1,21 @@
+--- a/src/ft2_about.c
++++ b/src/ft2_about.c
+@@ -194,7 +194,7 @@ void showAboutScreen(void) // called once when About 
screen is opened
+ 
+       showPushButton(PB_EXIT_ABOUT);
+ 
+-      sprintf(customText3, "v%s (%s)", PROG_VER_STR, __DATE__);
++      sprintf(customText3, "v%s (%s)", PROG_VER_STR, PROG_VER_DATE);
+       customText1X = (SCREEN_W - textWidth(customText1)) >> 1;
+       customText2X = (SCREEN_W-8) - textWidth(customText2);
+       customText3X = (SCREEN_W-8) - textWidth(customText3);
+--- a/src/ft2_header.h
++++ b/src/ft2_header.h
+@@ -13,6 +13,7 @@
+ #include "ft2_replayer.h"
+ 
+ #define PROG_VER_STR "1.62"
++#define PROG_VER_DATE "@DATE@"
+ 
+ // do NOT change these! It will only mess things up...
+ 

Reply via email to