Skip to content

Commit

Permalink
net/py-scamper: new port
Browse files Browse the repository at this point in the history
This port has the Python bits of net/scamper.

PR:		276395
  • Loading branch information
matthewluckie authored and clausecker committed Mar 19, 2024
1 parent 849771c commit 499be1d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
1 change: 1 addition & 0 deletions net/Makefile
Expand Up @@ -1142,6 +1142,7 @@
SUBDIR += py-s4cmd
SUBDIR += py-saltyrtc.server
SUBDIR += py-sbws
SUBDIR += py-scamper
SUBDIR += py-shodan
SUBDIR += py-siosocks
SUBDIR += py-smart-open
Expand Down
36 changes: 36 additions & 0 deletions net/py-scamper/Makefile
@@ -0,0 +1,36 @@
PORTREVISION= 0
CATEGORIES= net python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= mjl@luckie.org.nz
COMMENT= Python bindings for scamper

LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libscamperfile.so:${MASTER_PORT}

USES= python localbase:ldflags
USE_PYTHON= flavors
CONFIGURE_ARGS= --with-python

PORTSCOUT= ignore:1

SLAVE_PORT= yes
MASTERDIR= ${.CURDIR}/../scamper

PLIST= ${.CURDIR}/pkg-plist
BUILD_WRKSRC= ${WRKSRC}/lib/python
INSTALL_WRKSRC= ${BUILD_WRKSRC}

PLIST_FILES= ${PYTHONPREFIX_SITELIBDIR:S,^${PREFIX}/,,}/scamper.a \
${PYTHONPREFIX_SITELIBDIR:S,^${PREFIX}/,,}/scamper.so

post-patch:
@${REINPLACE_CMD} \
-e 's/$$(scamper_la_DEPENDENCIES)//' \
-e 's,../../scamper/libscamperfile.la,-lscamperfile,' \
-e 's,../libscamperctrl/libscamperctrl.la,-lscamperctrl,' \
${BUILD_WRKSRC}/Makefile.in

.include "${MASTERDIR}/Makefile"
8 changes: 7 additions & 1 deletion net/scamper/Makefile
Expand Up @@ -11,12 +11,16 @@ WWW= https://www.caida.org/tools/measurement/scamper/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

USES= gmake libtool ssl
USES+= gmake libtool ssl
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
INSTALL_TARGET= install-strip

SLAVE_PORT?= no

.if ${SLAVE_PORT} == no

OPTIONS_DEFINE= HOIHO UPTIME
OPTIONS_SUB= yes

Expand All @@ -31,4 +35,6 @@ HOIHO_CONFIGURE_WITH= pcre2
UPTIME_USES= localbase:ldflags sqlite:3
UPTIME_CONFIGURE_ENABLE= sc_uptime

.endif # ${SLAVE_PORT} == no

.include <bsd.port.mk>

0 comments on commit 499be1d

Please sign in to comment.