git: 3b3926bbc5a1 - main - graphics/fotoxx: the port had been updated to version 23.80
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Dec 2023 09:30:53 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3b3926bbc5a10839500cee3095595c765c5f679a
commit 3b3926bbc5a10839500cee3095595c765c5f679a
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-12-11 09:29:16 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-12-11 09:29:16 +0000
graphics/fotoxx: the port had been updated to version 23.80
Replace calls to linuxish lscpu(1) and lsb_release(1) programs
with native C++ function and uname(1) equivalent, respectively.
---
graphics/fotoxx/Makefile | 4 +---
graphics/fotoxx/distinfo | 6 ++---
graphics/fotoxx/files/patch-fotoxx.cc | 28 +++++++++++++++++++++++
graphics/fotoxx/files/patch-zfuncs.cc | 43 +++++++++++++++++++++--------------
graphics/fotoxx/pkg-plist | 8 +++----
5 files changed, 62 insertions(+), 27 deletions(-)
diff --git a/graphics/fotoxx/Makefile b/graphics/fotoxx/Makefile
index 8b05996052d2..23d5fd77d45c 100644
--- a/graphics/fotoxx/Makefile
+++ b/graphics/fotoxx/Makefile
@@ -1,5 +1,5 @@
PORTNAME= fotoxx
-PORTVERSION= 23.74
+PORTVERSION= 23.80
CATEGORIES= graphics
MASTER_SITES= https://kornelix.net/downloads/downloads/
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
@@ -31,8 +31,6 @@ PORTDOCS= *
OPTIONS_DEFINE= DOCS
post-patch:
- @${REINPLACE_CMD} -e \
- 's,pidof,pgrep -d\\\\ ,' ${WRKSRC}/fotoxx.cc
@${REINPLACE_CMD} -e \
'/#include/s,wait\.h,sys/&,' ${WRKSRC}/fotoxx.h
diff --git a/graphics/fotoxx/distinfo b/graphics/fotoxx/distinfo
index 7fc9192c832c..e4f40cdfb41e 100644
--- a/graphics/fotoxx/distinfo
+++ b/graphics/fotoxx/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1698847755
-SHA256 (fotoxx-23.74-source.tar.gz) = f0dc0879d448f743d7df38ef8d7ef865abe5feb730809267d83fb278f8e92476
-SIZE (fotoxx-23.74-source.tar.gz) = 16271809
+TIMESTAMP = 1701557310
+SHA256 (fotoxx-23.80-source.tar.gz) = 0ed4b7e91d3eb87a62dbff57d6e919facf3ad444924c5af3ef67ab4a31373073
+SIZE (fotoxx-23.80-source.tar.gz) = 16259363
diff --git a/graphics/fotoxx/files/patch-fotoxx.cc b/graphics/fotoxx/files/patch-fotoxx.cc
new file mode 100644
index 000000000000..da35de45266d
--- /dev/null
+++ b/graphics/fotoxx/files/patch-fotoxx.cc
@@ -0,0 +1,28 @@
+--- fotoxx.cc.orig 2023-12-02 22:45:44 UTC
++++ fotoxx.cc
+@@ -294,7 +294,7 @@ int main(int argc, ch *argv[])
+ // delete fotoxx temp files if owner process is no longer running
+
+ pidlist = 0;
+- snprintf(buff,200,"pidof fotoxx fotoxx.x"); // get active fotoxx PIDs 23.3
++ snprintf(buff,200,"pgrep -d\\ fotoxx fotoxx.x");
+ fid = popen(buff,"r");
+ if (fid) {
+ pp = fgets_trim(buff,200,fid);
+@@ -432,13 +432,15 @@ int main(int argc, ch *argv[])
+
+ // get SMP thread count // 23.3
+
+- NSMP = 0; // assume at least 4 threads
++ NSMP = get_nprocs();
++#if 0
+ fid = popen("lscpu | grep 'CPU(s):'","r");
+ if (fid) {
+ pp = fgets(buff,200,fid); // get CPU threads supported
+ pclose(fid);
+ if (pp && strmatchN(pp,"CPU(s):",7)) NSMP = atoi(pp+8); // default: 2 per P-core + 1 per E-core
+ }
++#endif
+ if (NSMP < 1) { // 23.80
+ Plog(1,"cannot get SMP thread count, assume 4 \n");
+ NSMP = 4;
diff --git a/graphics/fotoxx/files/patch-zfuncs.cc b/graphics/fotoxx/files/patch-zfuncs.cc
index 238953dcea7d..ce218c6ee7bf 100644
--- a/graphics/fotoxx/files/patch-zfuncs.cc
+++ b/graphics/fotoxx/files/patch-zfuncs.cc
@@ -1,14 +1,14 @@
---- zfuncs.cc.orig 2021-10-17 20:02:26 UTC
+--- zfuncs.cc.orig 2023-12-02 22:45:44 UTC
+++ zfuncs.cc
-@@ -551,6 +551,7 @@ int zmalloc_test(int64 cc)
+@@ -565,6 +565,7 @@ int zmalloc_test(int64 cc)
- double realmemory() // 21.55
+ double realmemory()
{
+#if defined(__linux__)
FILE *fid;
- char buff[100], *pp;
+ ch buff[100], *pp;
double rmem = 0;
-@@ -569,15 +570,45 @@ double realmemory()
+@@ -583,15 +584,45 @@ double realmemory()
}
fclose(fid);
@@ -52,9 +52,9 @@
{
+#if defined(__linux__)
FILE *fid;
- char buff[100], *pp;
+ ch buff[100], *pp;
double avmem = 0;
-@@ -602,6 +633,11 @@ double availmemory()
+@@ -616,6 +647,11 @@ double availmemory()
}
fclose(fid);
@@ -66,7 +66,16 @@
return avmem;
}
-@@ -996,7 +1032,7 @@ double get_seconds()
+@@ -755,7 +791,7 @@ void zappcrash(ch *format, ... )
+
+ uname(&unbuff); // get cpu arch. 32/64 bit
+ arch = unbuff.machine;
+- fid1 = popen("lsb_release -d","r"); // get Linux flavor and release
++ fid1 = popen("uname -nv","r");
+ if (fid1) {
+ ii = fscanf(fid1,"%s %s %s",OS1,OS2,OS3);
+ pclose(fid1);
+@@ -1060,7 +1096,7 @@ double get_seconds()
timespec time1;
double secs;
@@ -75,7 +84,7 @@
secs = time1.tv_sec;
secs += time1.tv_nsec * 0.000000001;
return secs;
-@@ -1020,7 +1056,7 @@ void logtime_init(cchar *text)
+@@ -1109,7 +1145,7 @@ void logtime_init(ch *text)
using namespace logtime_names;
printf("logtime init: %s\n",text);
@@ -84,7 +93,7 @@
return;
}
-@@ -1028,7 +1064,7 @@ void logtime(cchar *text)
+@@ -1117,7 +1153,7 @@ void logtime(ch *text)
{
using namespace logtime_names;
@@ -93,7 +102,7 @@
elapsed = time2.tv_sec - time1.tv_sec;
elapsed += 0.000000001 * (time2.tv_nsec - time1.tv_nsec);
time1 = time2;
-@@ -1649,6 +1685,10 @@ int main_thread()
+@@ -1812,6 +1848,10 @@ int wait_Jthread(pthread_t tid)
return 0;
}
@@ -104,7 +113,7 @@
/********************************************************************************/
-@@ -1659,7 +1699,7 @@ void set_cpu_affinity(int cpu)
+@@ -1862,7 +1902,7 @@ void set_cpu_affinity(int cpu)
{
int err;
static int ftf = 1, Nsmp;
@@ -113,7 +122,7 @@
if (ftf) { // first call
ftf = 0;
-@@ -1670,7 +1710,8 @@ void set_cpu_affinity(int cpu)
+@@ -1873,7 +1913,8 @@ void set_cpu_affinity(int cpu)
CPU_ZERO(&cpuset);
CPU_SET(cpu,&cpuset);
@@ -123,7 +132,7 @@
if (err) Plog(2,"set_cpu_affinity() %s \n",strerror(errno));
return;
}
-@@ -2234,7 +2275,7 @@ int diskspace(cchar *file)
+@@ -2274,7 +2315,7 @@ uint diskspace(ch *file)
FILE *fid;
pp = zescape_quotes(file); // 23.4
@@ -132,7 +141,7 @@
zfree(pp);
fid = popen(command,"r");
-@@ -4115,14 +4156,18 @@ cchar * SearchWildCase(cchar *wpath, int &uflag)
+@@ -4135,14 +4176,18 @@ ch * SearchWildCase(ch *wpath, int &uflag)
flist and flist[*] are subjects for zfree().
zfind() works for files containing quotes (")
@@ -152,7 +161,7 @@
int ii, jj, err, cc;
glob_t globdata;
ch *pp;
-@@ -5805,9 +5850,16 @@ int zinitapp(cchar *appvers, int argc, char *argv[])
+@@ -6109,9 +6154,16 @@ int zinitapp(ch *appvers, int argc, ch *argv[])
if (argc > 1 && strmatchV(argv[1],"-ver","-v",0)) exit(0); // exit if nothing else wanted
progexe = 0;
@@ -168,4 +177,4 @@
+#endif
progexe = zstrdup(buff,"zinitapp");
- err = appimage_install(zappname); // if appimage, menu integration
+ Plog(1,"program exe: %s \n",progexe); // executable path
diff --git a/graphics/fotoxx/pkg-plist b/graphics/fotoxx/pkg-plist
index baf2a4cd663c..e48cf37e04e1 100644
--- a/graphics/fotoxx/pkg-plist
+++ b/graphics/fotoxx/pkg-plist
@@ -125,6 +125,8 @@ share/applications/fotoxx.desktop
%%DATADIR%%/images/batch.png
%%DATADIR%%/images/blackball.png
%%DATADIR%%/images/blank-image.png
+%%DATADIR%%/images/blobs.png
+%%DATADIR%%/images/blobs2.jpg
%%DATADIR%%/images/blueball.png
%%DATADIR%%/images/blur.jpg
%%DATADIR%%/images/bookmarks.png
@@ -137,10 +139,8 @@ share/applications/fotoxx.desktop
%%DATADIR%%/images/cartoon2.jpg
%%DATADIR%%/images/change-alpha.png
%%DATADIR%%/images/choose-captions.png
-%%DATADIR%%/images/chromatic1.png
-%%DATADIR%%/images/chromatic1A.png
-%%DATADIR%%/images/chromatic2.png
-%%DATADIR%%/images/chromatic2A.jpg
+%%DATADIR%%/images/chromatic.png
+%%DATADIR%%/images/chromaticA.png
%%DATADIR%%/images/color-depth1.png
%%DATADIR%%/images/color-depth2.png
%%DATADIR%%/images/color-mode.png