pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/ncurses



Module Name:    pkgsrc
Committed By:   gdt
Date:           Wed May  1 20:15:59 UTC 2019

Modified Files:
        pkgsrc/devel/ncurses: builtin.mk

Log Message:
devel/ncurses: Add fake pc file

Add support for creating ncurses.pc in the buildlink dir, either by
linking to the base one, or creating a fake one.  More or less copied
from ../libuuid/builtin.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/devel/ncurses/builtin.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/ncurses/builtin.mk
diff -u pkgsrc/devel/ncurses/builtin.mk:1.40 pkgsrc/devel/ncurses/builtin.mk:1.41
--- pkgsrc/devel/ncurses/builtin.mk:1.40        Thu Jan  5 22:18:03 2017
+++ pkgsrc/devel/ncurses/builtin.mk     Wed May  1 20:15:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.40 2017/01/05 22:18:03 joerg Exp $
+# $NetBSD: builtin.mk,v 1.41 2019/05/01 20:15:59 gdt Exp $
 
 BUILTIN_PKG:=  ncurses
 
@@ -14,6 +14,8 @@ BUILTIN_FIND_HEADERS.H_CURSES=        ncurses.h
 BUILTIN_FIND_GREP.H_CURSES=    mvwchgat
 BUILTIN_FIND_HEADERS.H_CURSES1=        ncurses.h curses.h
 BUILTIN_FIND_GREP.H_CURSES1=   wsyncup
+BUILTIN_FIND_FILES_VAR=                NCURSES_PC
+BUILTIN_FIND_FILES.NCURSES_PC= /usr/lib/pkgconfig/ncurses.pc
 
 .include "../../mk/buildlink3/bsd.builtin.mk"
 
@@ -154,6 +156,8 @@ BUILDLINK_LIBNAME.ncurses=  ${BUILTIN_LIB
 BUILDLINK_TRANSFORM+=          l:ncurses:${BUILTIN_LIBNAME.ncurses}
 BUILDLINK_TARGETS+=            buildlink-curses-ncurses-h
 BUILDLINK_TARGETS+=            buildlink-ncurses-extra-includes
+# NetBSD 8 at least does not have ncurses.pc
+BUILDLINK_TARGETS+=            ncurses-fake-pc
 .  else
 BUILDLINK_TRANSFORM+=          l:form:gnuform
 BUILDLINK_TRANSFORM+=          l:panel:gnupanel
@@ -196,4 +200,23 @@ buildlink-curses-ncurses-h:
        done
 .  endif
 
+.  if !target(ncurses-fake-pc)
+.PHONY: ncurses-fake-pc
+ncurses-fake-pc:
+       ${RUN}                                          \
+       ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig;        \
+       src=${NCURSES_PC}                               \
+       dst=${BUILDLINK_DIR}/lib/pkgconfig/ncurses.pc;  \
+       if ${TEST} -f $${src}; then \
+               ${LN} -sf $${src} $${dst}; \
+       else \
+               {       ${ECHO} "Name: ncurses";                        \
+                       ${ECHO} "Description: ncurses library";         \
+                       ${ECHO} "Version: ${BUILTIN_VERSION.ncurses}";  \
+                       ${ECHO} "Libs: -L/usr/lib -lncurses";           \
+                       ${ECHO} "Cflags: -I/usr/include";               \
+               } >$${dst} ;\
+       fi
+.  endif
+
 .endif # CHECK_BUILTIN.ncurses



Home | Main Index | Thread Index | Old Index