Skip to content

Commit

Permalink
freeimage improvements
Browse files Browse the repository at this point in the history
1) use SOVERSION (don't hardcode library versions in plists)
2) use pre-configure over post-patch (good practice)
3) only .so files stay in dev*

* that's the current standard
  It's not perfect because sometimes configuration scripts assume that
  if .so is there, the symlinked target is also there.  In reality .so
  files should be separate from both dev and primary subpackages but
  that is too cumbersome.

  so the result is sometimes the port has to physically remove the file
  after installation.  Maybe rvn can be modified to help here?
  • Loading branch information
jrmarino committed Jun 23, 2024
1 parent e527b49 commit 39e7175
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions bucket_F6/freeimage/manifests/plist.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ include/FreeImage.h
include/FreeImagePlus.h
lib/libfreeimage.a
lib/libfreeimage.so
lib/libfreeimage.so.3
lib/libfreeimageplus.a
lib/libfreeimageplus.so
lib/libfreeimageplus.so.3
lib/pkgconfig/freeimage.pc
6 changes: 4 additions & 2 deletions bucket_F6/freeimage/manifests/plist.primary
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
lib/libfreeimage-3.18.0.so
lib/libfreeimageplus-3.18.0.so
lib/libfreeimage-%%SOVERSION%%.so
lib/libfreeimage.so.%%SOMAJOR%%
lib/libfreeimageplus-%%SOVERSION%%.so
lib/libfreeimageplus.so.%%SOMAJOR%%
4 changes: 3 additions & 1 deletion bucket_F6/freeimage/specification
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DEF[PORTVERSION]= 3.18.0
DEF[DISTVERSION]= 3180
DEF[SOVERSION]= 3.18.0
# ----------------------------------------------------------------------------

NAMEBASE= freeimage
Expand Down Expand Up @@ -53,8 +54,9 @@ SUB_LIST= VERSION="${PORTVERSION}"
CFLAGS= -std=c++14 -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC
CXXFLAGS= -std=c++14 -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC
MAKE_ARGS= CC="{{CC}}" CPP="{{CPP}}" CXX="{{CXX}}"
SOVERSION= ${SOVERSION}

post-patch:
pre-configure:
${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root || ; \
/^-fPIC/d' ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip

Expand Down

0 comments on commit 39e7175

Please sign in to comment.