Skip to content

Commit

Permalink
ports-mgmt/portconfig: new port
Browse files Browse the repository at this point in the history
portconfig is a dialog4ports replacement based on libbsddialog.
Note this version is build as semi static: libbsddialog and libncurses
has been linked statically and the binary remaind dynamic
  • Loading branch information
bapt committed Nov 23, 2021
1 parent 56641e1 commit 5f891a8
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports-mgmt/Makefile
Expand Up @@ -40,6 +40,7 @@
SUBDIR += port-maintenance-tools
SUBDIR += portal
SUBDIR += portconf
SUBDIR += portconfig
SUBDIR += portdowngrade
SUBDIR += portest
SUBDIR += portfind
Expand Down
20 changes: 20 additions & 0 deletions ports-mgmt/portconfig/Makefile
@@ -0,0 +1,20 @@
PORTNAME= portconfig
PORTVERSION= 0.0.0.g20211122
CATEGORIES= ports-mgmt

MAINTAINER= bapt@FreeBSD.org
COMMENT= Utility to set up FreeBSD port options

LICENSE= BSD2CLAUSE

USE_GITLAB= yes
GL_ACCOUNT= alfix
GL_COMMIT= 49d968fbd5f8285b53f3527708e45544dd456c48

USES= localbase:ldflags
BUILD_DEPENDS= ${LOCALBASE}/lib/libbsddialog.a:devel/bsddialog

PLIST_FILES= bin/${PORTNAME}

.include <bsd.port.mk>

3 changes: 3 additions & 0 deletions ports-mgmt/portconfig/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1637570379
SHA256 (alfix-portconfig-49d968fbd5f8285b53f3527708e45544dd456c48_GL0.tar.gz) = 853f0675094bb3e286b2f35bd634bf7861e6c238a6ea81fd41d57f6c2c9e122f
SIZE (alfix-portconfig-49d968fbd5f8285b53f3527708e45544dd456c48_GL0.tar.gz) = 201781
44 changes: 44 additions & 0 deletions ports-mgmt/portconfig/files/patch-Makefile
@@ -0,0 +1,44 @@
--- Makefile.orig 2021-11-20 16:29:49 UTC
+++ Makefile
@@ -6,23 +6,22 @@
OUTPUT= portconfig
SOURCES= portconfig.c
OBJECTS= ${SOURCES:.c=.o}
-LIBPATH= ${.CURDIR}/bsddialog/lib
LIBBSDDIALOG= ${LIBPATH}/libbsddialog.so

-CFLAGS= -Wall -I${LIBPATH}
-LDFLAGS= -Wl,-rpath=${LIBPATH} -L${LIBPATH} -lbsddialog
+CFLAGS+= -Wall
+LDFLAGS+= -L/usr/lib -Wl,-Bstatic -v -Wl,-whole-archive -lbsddialog -Wl,-no-whole-archive -lformw -lncursesw -ltinfow -Wl,-Bdynamic -Wl,--export-dynamic

-BINDIR= /usr/local/bin
+BINDIR= ${PREFIX}/bin
MAN= ${OUTPUT}.1
GZIP= gzip -cn
-MANDIR= /usr/local/share/man/man1
+MANDIR= ${PREFIX}/share/man/man1

INSTALL= install
RM= rm -f

all : ${OUTPUT}

-${OUTPUT}: ${LIBBSDDIALOG} ${OBJECTS}
+${OUTPUT}: ${OBJECTS}
${CC} ${LDFLAGS} ${OBJECTS} -o ${.PREFIX}

${LIBBSDDIALOG}:
@@ -36,9 +35,9 @@ ${LIBBSDDIALOG}:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}

install:
- ${INSTALL} -s -m 555 ${OUTPUT} ${BINDIR}
- ${GZIP} ${MAN} > ${MAN}.gz
- ${INSTALL} -m 444 ${MAN}.gz ${MANDIR}
+ ${INSTALL} -s -m 555 ${OUTPUT} ${DESTDIR}${BINDIR}
+ #${GZIP} ${MAN} > ${MAN}.gz
+ #${INSTALL} -m 444 ${MAN}.gz ${MANDIR}

unistall:
${RM} ${BINDIR}/${OUTPUT}
3 changes: 3 additions & 0 deletions ports-mgmt/portconfig/pkg-descr
@@ -0,0 +1,3 @@
Utility to set up FreeBSD ports options

WWW: https://gitlab.com/alfix/portconfig

0 comments on commit 5f891a8

Please sign in to comment.