x11-toolkits/fox17: Update to 1.7.85

Remove the graphics/libpng dependency and configure option. PNG support
is now entirely built-in.

graphics/libGLU is only needed to build the glviewer test program. Its
presence on the host system doesn't affect the installation.

Remove reference to removed port x11-toolkits/fox14.

Pet portclippy(1) and portlint (1).

Update patches due to changes in base and to make them more upstream-
friendly.

Changes:
- New PNG image support. First, its faster! Also, it no longer requires
  libpng; the PNG format support is now built-in, although the libz
  compression library is still required [for now...].
- fxsavePNG() supports some fine-control via new save-flags. You can
  analyze the image, and shrink output by taking advantage of image
  features; for example, saving opaque image means alpha-channel may be
  dropped. If the image is gray-levels only, the RGB may be dropped to
  plain gray only. Also, shrinking further by emitting colormapped
  [indexed-color] image is possible if only a few colors are used.
  Finally, pre-compression filtering, as well as desired compression
  level can be selected.
- PNG I/O is optimized with when target ISA x86-64-v2 or higher are
  selected.
- FXStat::isSame() checks if two files are the same (same inode).
- FOX Desktop Calculator augmented with Unicode button labels (please
  select a font that has the math symbols!), also now supports additional
  functions, common physics constants, and other features.
- The fxCPUFeatures now can detect AVX512 presence.
- New FXPerformanceCounter and associated macros may be used to count
  clockcyles of critical code segments.
- FXAtomic.h APIs now mostly inlined for lower overhead.
- Read processor ticks on AARCH64.
- Adie text editor undo buffer size and undo buffer items can now be
  configured.
- New QOIF (Quite OK Image Format) now supported for either images
  (FXQOIFImage) or icons (FXQOIFIcon).
- FXColor to/from FXVec3d, FXVec3f, FXVec4d, FXVec4f now using SSE if
  compiled for x86-64-v2 or higher.
- Updated byte swap APIs in fxendian.h.
- New APIs in FXMat3f, FXMat3d, etc. classes to set up mirror-matrix.
- Moved new hash32() etc. functions into fxendian.h.
- Bug fix in FXIODevice reading > 1GB files in one readBlock(),
  writeBlock() call.
- Markdown syntax coloring in Adie.
- Per-syntax mode setting for removing trailing spaces in Adie saving a
  text file.
- Subtle change in operation of FXPath::relative().
- Support for CRC32 calculations added.
- Additional conversion options in FXString::fromFloat() and
  FXString::fromDouble(): thousands groupings, force decimal point,
  and hexadecimal float output.
- FXJSON JSON loader now may report duplicate key warning reading json
  file.
- FXMappedFile improvements.
- FXString unicode escapes bug fix.
This commit is contained in:
Jason E. Hale 2024-08-24 01:43:42 -04:00
parent ef0c12d076
commit bcd2014823
7 changed files with 70 additions and 50 deletions

View file

@ -1,6 +1,5 @@
PORTNAME= fox PORTNAME= fox
PORTVERSION= 1.7.84 PORTVERSION= 1.7.85
PORTREVISION= 2
CATEGORIES= x11-toolkits CATEGORIES= x11-toolkits
MASTER_SITES= http://fox-toolkit.org/ftp/ \ MASTER_SITES= http://fox-toolkit.org/ftp/ \
ftp://ftp.fox-toolkit.org/pub/ ftp://ftp.fox-toolkit.org/pub/
@ -13,40 +12,39 @@ WWW= http://www.fox-toolkit.org/
LICENSE= LGPL3+ LICENSE= LGPL3+
LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libpng.so:graphics/png \ LIB_DEPENDS= libfreetype.so:print/freetype2 \
libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig libfontconfig.so:x11-fonts/fontconfig
USES= compiler:c++11-lib gl libtool localbase pathfix pkgconfig xorg USES= compiler:c++11-lib gl libtool localbase pathfix pkgconfig xorg
USE_GL= gl glu USE_GL= gl
USE_XORG= ice sm x11 xcursor xext xfixes xft xi xrandr xrender
USE_LDCONFIG= yes USE_LDCONFIG= yes
USE_XORG= ice sm x11 xcursor xext xfixes xft xi xrandr xrender
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share CONFIGURE_ARGS= --with-freetype-include="`pkg-config freetype2 --cflags | ${SED} -e 's|^-I||'`" \
CONFIGURE_ARGS= --with-freetype-include="`pkg-config freetype2 --cflags | sed -e 's|^-I||'`" \ --with-freetype-library="`pkg-config freetype2 --libs | ${SED} -e 's|^-L||'`" \
--with-freetype-library="`pkg-config freetype2 --libs | sed -e 's|^-L||'`" \
--with-opengl=yes \ --with-opengl=yes \
--with-xim \ --with-xim \
--enable-png \
--bindir=${PREFIX}/bin/${PORTNAME}-${MAJORVER} --bindir=${PREFIX}/bin/${PORTNAME}-${MAJORVER}
INSTALL_TARGET= install-strip INSTALL_TARGET= install-strip
CPPFLAGS+= -D__BSD_VISIBLE -D__EXT1_VISIBLE -D_XOPEN_SOURCE=700 CPPFLAGS+= -D__BSD_VISIBLE -D__EXT1_VISIBLE -D_XOPEN_SOURCE=700
MAJORVER= ${PORTVERSION:R}
PLIST_SUB+= MAJORVER=${MAJORVER}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${MAJORVER} DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${MAJORVER}
MAJORVER= ${PORTVERSION:R}
PLIST_SUB= MAJORVER=${MAJORVER}
PORTDOCS= * PORTDOCS= *
OPTIONS_DEFINE= CUPS DEBUG DOCS EXAMPLES OPTIMIZED_CFLAGS PROFILE TEST OPTIONS_DEFINE= CUPS DEBUG DOCS EXAMPLES OPTIMIZED_CFLAGS PROFILE TEST
OPTIONS_DEFAULT= JPEG OPENJPEG TIFF WEBP
OPTIONS_GROUP= IMGFMTS OPTIONS_GROUP= IMGFMTS
OPTIONS_GROUP_IMGFMTS= JPEG OPENJPEG TIFF WEBP OPTIONS_GROUP_IMGFMTS= JPEG OPENJPEG TIFF WEBP
OPTIONS_DEFAULT= JPEG OPENJPEG TIFF WEBP
IMGFMTS_DESC= Image formats IMGFMTS_DESC= Image formats
CUPS_CONFIGURE_ENABLE= cups
CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_LIB_DEPENDS= libcups.so:print/cups
CUPS_CONFIGURE_ENABLE= cups
DEBUG_CONFIGURE_ENABLE= debug DEBUG_CONFIGURE_ENABLE= debug
DEBUG_CXXFLAGS_OFF= -DNDEBUG DEBUG_CXXFLAGS_OFF= -DNDEBUG
@ -60,6 +58,11 @@ OPENJPEG_CPPFLAGS= -I${LOCALBASE}/include/openjpeg-1.5
PROFILE_CONFIGURE_ON= --with-profiling=gprof PROFILE_CONFIGURE_ON= --with-profiling=gprof
# USES=gl/USE_GL only support LIB_DEPENDS. We just need GLU at
# build time to compile the glviewer test program. FOX itself doesn't
# link to it. Tests are run manually out of the ${WRKSRC}/tests dir.
TEST_BUILD_DEPENDS= ${LOCALBASE}/include/GL/glu.h:graphics/libGLU
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
TIFF_CONFIGURE_ENABLE= tiff TIFF_CONFIGURE_ENABLE= tiff
@ -80,7 +83,7 @@ CXXFLAGS+= -fexpensive-optimizations -finline-functions
post-patch: post-patch:
# Rename man pages as in manpage.1 --> manpage-17.1 to avoid # Rename man pages as in manpage.1 --> manpage-17.1 to avoid
# conflicts with fox14 and fox16 # conflicts with fox16
@files=$$(${FIND} ${WRKSRC} -name *.1); \ @files=$$(${FIND} ${WRKSRC} -name *.1); \
for f in $$files; do \ for f in $$files; do \
${MV} $$f `${ECHO_CMD} $$f | ${SED} -e 's|\.1|-17.1|'`; \ ${MV} $$f `${ECHO_CMD} $$f | ${SED} -e 's|\.1|-17.1|'`; \

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1694789626 TIMESTAMP = 1724224733
SHA256 (fox-1.7.84.tar.gz) = bdb1fe785605488b58addc95f6091a75873e8a3bea7b83caecfb7f4b0827b34e SHA256 (fox-1.7.85.tar.gz) = 195de7d95dd5f6fd54b4ab480d2824584e9a12765c19744e64a2e7a89248474f
SIZE (fox-1.7.84.tar.gz) = 5879987 SIZE (fox-1.7.85.tar.gz) = 5912948

View file

@ -0,0 +1,26 @@
Add missing include that was removed in 1.7.85 for some reason. FXSelector
is defined in FXMetaClass.h. Fox itself builds, but audio/gogglesmm fails.
/usr/local/include/fox-1.7/FXObject.h:135:3: fatal error: no type named 'FXSelector' in namespace 'FX'
135 | FXDECLARE(FXObject)
| ^~~~~~~~~~~~~~~~~~~
/usr/local/include/fox-1.7/FXObject.h:50:28: note: expanded from macro 'FXDECLARE'
50 | struct FXMapEntry { FX::FXSelector keylo; FX::FXSelector keyhi; long (classname::* func)(FX::FXObject*,FX::FXSelector,void*); }; \
| ~~~~^
Upstream has been notified of this issue:
https://sourceforge.net/p/foxgui/mailman/foxgui-users/thread/CAJE75NFrWfZUx%3DifHt2GrzbwPrRSG9DaHLP3Xa%2Bo2DCZwPFTTw%40mail.gmail.com/#msg58809602
--- include/FXObject.h.orig 2024-06-30 15:47:37 UTC
+++ include/FXObject.h
@@ -25,6 +25,10 @@
#include "FXCallback.h"
#endif
+#ifndef FXMETACLASS_H
+#include "FXMetaClass.h"
+#endif
+
namespace FX {

View file

@ -1,20 +0,0 @@
--- lib/FXAtomic.cpp.orig 2020-11-30 16:10:17 UTC
+++ lib/FXAtomic.cpp
@@ -54,7 +54,7 @@
// New __atomic_XXX() builtins are available
-#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
+#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) || (defined(__clang__) && defined(__x86_64__))
#define HAVE_BUILTIN_ATOMIC 1
#endif
@@ -64,7 +64,7 @@
#endif
// Can we use inline-assembly
-#if (defined(__GNUC__) || defined(__INTEL_COMPILER))
+#if (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__))
#define HAVE_INLINE_ASSEMBLY 1
#endif

View file

@ -9,7 +9,7 @@ regression on FreeBSD.
FXASSERT_STATIC(sizeof(data)>=sizeof(pthread_rwlock_t)); FXASSERT_STATIC(sizeof(data)>=sizeof(pthread_rwlock_t));
pthread_rwlockattr_t rwlockatt; pthread_rwlockattr_t rwlockatt;
pthread_rwlockattr_init(&rwlockatt); pthread_rwlockattr_init(&rwlockatt);
+#if defined(__linux__) +#if defined(__GLIBC__)
pthread_rwlockattr_setkind_np(&rwlockatt,PTHREAD_RWLOCK_PREFER_WRITER_NP); pthread_rwlockattr_setkind_np(&rwlockatt,PTHREAD_RWLOCK_PREFER_WRITER_NP);
+#endif +#endif
pthread_rwlock_init((pthread_rwlock_t*)data,&rwlockatt); pthread_rwlock_init((pthread_rwlock_t*)data,&rwlockatt);

View file

@ -1,9 +1,9 @@
Emulate the behavior of the USG UNIX 'daylight' and 'timezone' variables Emulate the behavior of the USG UNIX 'daylight' and 'timezone' variables
implemented in glibc. where not implemented.
int daylight: Zero if the time zone does not have any daylight saving time int daylight: Zero if the time zone does not have any daylight saving time
rules and non-zero if there is a time during the year when daylight saving rules and non-zero if there is a time during the year when daylight saving
time applies. [1] In FreeBSD, tzname[1] should be set to " " (three spaces) time applies. [1] On FreeBSD, tzname[1] should be set to " " (three spaces)
if DST is never observed. [2] if DST is never observed. [2]
long int timezone: contains the difference between UTC and the latest local long int timezone: contains the difference between UTC and the latest local
@ -12,16 +12,21 @@ zone, the value is 5*60*60. Unlike the tm_gmtoff member of the broken-down
time structure, this value is not adjusted for daylight saving, and its sign time structure, this value is not adjusted for daylight saving, and its sign
is reversed. [1] is reversed. [1]
After [3], use the base implementations of 'daylight' and 'timezone'.
[1] https://www.gnu.org/software/libc/manual/html_node/Time-Zone-Functions.html#Time-Zone-Functions [1] https://www.gnu.org/software/libc/manual/html_node/Time-Zone-Functions.html#Time-Zone-Functions
[2] https://cgit.freebsd.org/src/tree/contrib/tzcode/stdtime/localtime.c?id=9436aa0e668b147c9a5bf1898ef091934c676434#n84 [2] https://cgit.freebsd.org/src/tree/contrib/tzcode/stdtime/localtime.c?id=9436aa0e668b147c9a5bf1898ef091934c676434#n84
[3] https://cgit.freebsd.org/src/commit/?id=a34940a9756ac8edce36fec176949ee82e9235b4
--- lib/FXSystemTime.cpp.orig 2020-12-24 17:03:54 UTC --- lib/FXSystemTime.cpp.orig 2024-06-30 15:47:37 UTC
+++ lib/FXSystemTime.cpp +++ lib/FXSystemTime.cpp
@@ -265,7 +265,10 @@ FXTime FXSystem::localTimeZoneOffset(){ @@ -264,8 +264,11 @@ FXTime FXSystem::localTimeZoneOffset(){
#if defined(_WIN32) setuplocaltimezone();
#if defined(WIN32)
return minutes*tzi.Bias; // +minutes*tzi.StandardBias; return minutes*tzi.Bias; // +minutes*tzi.StandardBias;
#elif defined(__FreeBSD__) || defined(__OpenBSD__) -#elif defined(__FreeBSD__) || defined(__OpenBSD__)
- return 0; // FIXME - return 0; // FIXME
+#elif defined(__FreeBSD__) && __FreeBSD_version < 1500015 || defined (__OpenBSD__)
+ struct tm tmresult; + struct tm tmresult;
+ time_t tmp=time(&tmp); + time_t tmp=time(&tmp);
+ struct tm* ptm=localtime_r(&tmp,&tmresult); + struct tm* ptm=localtime_r(&tmp,&tmresult);
@ -29,11 +34,13 @@ is reversed. [1]
#else #else
return seconds*timezone; return seconds*timezone;
#endif #endif
@@ -278,7 +281,7 @@ FXTime FXSystem::daylightSavingsOffset(){ @@ -277,8 +280,8 @@ FXTime FXSystem::daylightSavingsOffset(){
#if defined(_WIN32) setuplocaltimezone();
#if defined(WIN32)
return minutes*tzi.DaylightBias; // Or difference between standard and daylight bias. return minutes*tzi.DaylightBias; // Or difference between standard and daylight bias.
#elif defined(__FreeBSD__) || defined(__OpenBSD__) -#elif defined(__FreeBSD__) || defined(__OpenBSD__)
- return 0; // FIXME - return 0; // FIXME
+#elif defined(__FreeBSD__) && __FreeBSD_version < 1500015 || defined (__OpenBSD__)
+ return -hours*((tzname[1][0] == ' ') ? 0 : 1); + return -hours*((tzname[1][0] == ' ') ? 0 : 1);
#else #else
return -hours*daylight; return -hours*daylight;

View file

@ -228,6 +228,7 @@ include/fox-%%MAJORVER%%/FXPacker.h
include/fox-%%MAJORVER%%/FXParallel.h include/fox-%%MAJORVER%%/FXParallel.h
include/fox-%%MAJORVER%%/FXParseBuffer.h include/fox-%%MAJORVER%%/FXParseBuffer.h
include/fox-%%MAJORVER%%/FXPath.h include/fox-%%MAJORVER%%/FXPath.h
include/fox-%%MAJORVER%%/FXPerformance.h
include/fox-%%MAJORVER%%/FXPicker.h include/fox-%%MAJORVER%%/FXPicker.h
include/fox-%%MAJORVER%%/FXPipe.h include/fox-%%MAJORVER%%/FXPipe.h
include/fox-%%MAJORVER%%/FXPoint.h include/fox-%%MAJORVER%%/FXPoint.h
@ -238,6 +239,8 @@ include/fox-%%MAJORVER%%/FXProgressBar.h
include/fox-%%MAJORVER%%/FXProgressDialog.h include/fox-%%MAJORVER%%/FXProgressDialog.h
include/fox-%%MAJORVER%%/FXPtrList.h include/fox-%%MAJORVER%%/FXPtrList.h
include/fox-%%MAJORVER%%/FXPtrQueue.h include/fox-%%MAJORVER%%/FXPtrQueue.h
include/fox-%%MAJORVER%%/FXQOIFIcon.h
include/fox-%%MAJORVER%%/FXQOIFImage.h
include/fox-%%MAJORVER%%/FXQuatd.h include/fox-%%MAJORVER%%/FXQuatd.h
include/fox-%%MAJORVER%%/FXQuatf.h include/fox-%%MAJORVER%%/FXQuatf.h
include/fox-%%MAJORVER%%/FXRASIcon.h include/fox-%%MAJORVER%%/FXRASIcon.h
@ -363,6 +366,7 @@ include/fox-%%MAJORVER%%/fx3d.h
include/fox-%%MAJORVER%%/fxascii.h include/fox-%%MAJORVER%%/fxascii.h
include/fox-%%MAJORVER%%/fxchar.h include/fox-%%MAJORVER%%/fxchar.h
include/fox-%%MAJORVER%%/fxcpuid.h include/fox-%%MAJORVER%%/fxcpuid.h
include/fox-%%MAJORVER%%/fxcrc.h
include/fox-%%MAJORVER%%/fxdefs.h include/fox-%%MAJORVER%%/fxdefs.h
include/fox-%%MAJORVER%%/fxendian.h include/fox-%%MAJORVER%%/fxendian.h
include/fox-%%MAJORVER%%/fxkeys.h include/fox-%%MAJORVER%%/fxkeys.h
@ -373,11 +377,11 @@ include/fox-%%MAJORVER%%/xincs.h
lib/libCHART-%%MAJORVER%%.a lib/libCHART-%%MAJORVER%%.a
lib/libCHART-%%MAJORVER%%.so lib/libCHART-%%MAJORVER%%.so
lib/libCHART-%%MAJORVER%%.so.0 lib/libCHART-%%MAJORVER%%.so.0
lib/libCHART-%%MAJORVER%%.so.0.0.84 lib/libCHART-%%MAJORVER%%.so.0.0.85
lib/libFOX-%%MAJORVER%%.a lib/libFOX-%%MAJORVER%%.a
lib/libFOX-%%MAJORVER%%.so lib/libFOX-%%MAJORVER%%.so
lib/libFOX-%%MAJORVER%%.so.0 lib/libFOX-%%MAJORVER%%.so.0
lib/libFOX-%%MAJORVER%%.so.0.0.84 lib/libFOX-%%MAJORVER%%.so.0.0.85
libdata/pkgconfig/fox17.pc libdata/pkgconfig/fox17.pc
share/man/man1/ControlPanel-17.1.gz share/man/man1/ControlPanel-17.1.gz
%%PORTEXAMPLES%%share/man/man1/PathFinder-17.1.gz %%PORTEXAMPLES%%share/man/man1/PathFinder-17.1.gz