On Sun, Feb 25, 2018 at 04:13:38PM +0100, Frederic Cambus wrote:
> Here is a new port: converters/p5-Sereal-Encoder

I had some problems with linking -lzstd especially when this package
was installed.  I would recommend to add archivers/zstd as lib
dependency and always use the library from the existing package.

Also for the included Devel::CheckLib we have a package.  I prefer
to add dependencies and remove the included stuff.  Then I am sure
which software is used after all this build magic.

I think the following things should change:
- There are some source files with different license, the comment
  should include them.
- add zstd to wantlib
- depend on devel/p5-Devel-CheckLib and archivers/zstd
- according to Makefile.PL p5-Sereal-Decoder version >=4.002 is
  needed for testing.  I prefer to keep the version in sync with
  our test dependecies.
- remove the unused Devel/CheckLib and zstd
- patch to search for libraries in /usr/local

I have included my proposed changes for p5-Sereal-Encoder.

bluhm


# $OpenBSD$

COMMENT =       fast, compact, powerful binary serialization

DISTNAME =      Sereal-Encoder-4.005

CATEGORIES =    converters

MAINTAINER =    Frederic Cambus <fcam...@openbsd.org>

# Perl, BSD, LGPLv2.1
PERMIT_PACKAGE_CDROM =  Yes

WANTLIB =       c perl zstd

MODULES =       cpan

BUILD_DEPENDS = devel/p5-Devel-CheckLib

LIB_DEPENDS =   archivers/zstd

TEST_DEPENDS =  converters/p5-Sereal-Decoder>=4.002 \
                devel/p5-Test-Deep \
                devel/p5-Test-Differences \
                devel/p5-Test-LongString \
                devel/p5-Test-Warn

CPAN_AUTHOR =   YVES

post-extract:
        rm -r -- ${WRKSRC}/inc/Devel ${WRKSRC}/zstd

pre-configure:
        ${SUBST_CMD} ${WRKSRC}/Makefile.PL

.include <bsd.port.mk>


$OpenBSD$

Index: Makefile.PL
--- Makefile.PL.orig
+++ Makefile.PL
@@ -91,9 +91,9 @@ inc::Sereal::BuildTools::WriteMakefile(
     LICENSE => 'perl',
     ABSTRACT_FROM => 'lib/Sereal/Encoder.pm',
     AUTHOR => 'Steffen Mueller <smuel...@cpan.org>, Yves Orton 
<y...@cpan.org>',
-    LIBS              => [$libs], # e.g., '-lm'
+    LIBS              => ["-L${LOCALBASE}/lib $libs"], # e.g., '-lm'
     DEFINE            => $defines,
-    INC               => '-I.', # e.g., '-I. -I/usr/include/other'
+    INC               => "-I. -I${LOCALBASE}/include", # e.g., '-I. 
-I/usr/include/other'
     OPTIMIZE          => $optimize,
     DIR               => $subdirs,
     OBJECT            => $objects,

Reply via email to