pkgsrc-WIP-changes archive

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

freetype2-32: Add files from freetype2 package in pkgsrc



Module Name:	pkgsrc-wip
Committed By:	Naveen Narayanan <zerous@nocebo.space>
Pushed By:	zerous
Date:		Tue Jul 9 22:19:56 2019 +0200
Changeset:	827283be5dba96595f2c2b241216ea56805841ab

Added Files:
	freetype2-32/PLIST
	freetype2-32/buildlink3.mk
	freetype2-32/builtin.mk
	freetype2-32/options.mk
	freetype2-32/patches/patch-builds_unix_freetype-config.in
	freetype2-32/patches/patch-builds_unix_unix-cc.in

Log Message:
freetype2-32: Add files from freetype2 package in pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=827283be5dba96595f2c2b241216ea56805841ab

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

diffstat:
 freetype2-32/PLIST                                 | 56 +++++++++++++
 freetype2-32/buildlink3.mk                         | 37 ++++++++
 freetype2-32/builtin.mk                            | 98 ++++++++++++++++++++++
 freetype2-32/options.mk                            | 13 +++
 .../patches/patch-builds_unix_freetype-config.in   | 41 +++++++++
 freetype2-32/patches/patch-builds_unix_unix-cc.in  | 34 ++++++++
 6 files changed, 279 insertions(+)

diffs:
diff --git a/freetype2-32/PLIST b/freetype2-32/PLIST
new file mode 100644
index 0000000000..825b8a484e
--- /dev/null
+++ b/freetype2-32/PLIST
@@ -0,0 +1,56 @@
+@comment $NetBSD$
+bin/freetype-config
+include/freetype2/freetype/config/ftconfig.h
+include/freetype2/freetype/config/ftheader.h
+include/freetype2/freetype/config/ftmodule.h
+include/freetype2/freetype/config/ftoption.h
+include/freetype2/freetype/config/ftstdlib.h
+include/freetype2/freetype/freetype.h
+include/freetype2/freetype/ftadvanc.h
+include/freetype2/freetype/ftbbox.h
+include/freetype2/freetype/ftbdf.h
+include/freetype2/freetype/ftbitmap.h
+include/freetype2/freetype/ftbzip2.h
+include/freetype2/freetype/ftcache.h
+include/freetype2/freetype/ftchapters.h
+include/freetype2/freetype/ftcid.h
+include/freetype2/freetype/ftcolor.h
+include/freetype2/freetype/ftdriver.h
+include/freetype2/freetype/fterrdef.h
+include/freetype2/freetype/fterrors.h
+include/freetype2/freetype/ftfntfmt.h
+include/freetype2/freetype/ftgasp.h
+include/freetype2/freetype/ftglyph.h
+include/freetype2/freetype/ftgxval.h
+include/freetype2/freetype/ftgzip.h
+include/freetype2/freetype/ftimage.h
+include/freetype2/freetype/ftincrem.h
+include/freetype2/freetype/ftlcdfil.h
+include/freetype2/freetype/ftlist.h
+include/freetype2/freetype/ftlzw.h
+include/freetype2/freetype/ftmac.h
+include/freetype2/freetype/ftmm.h
+include/freetype2/freetype/ftmodapi.h
+include/freetype2/freetype/ftmoderr.h
+include/freetype2/freetype/ftotval.h
+include/freetype2/freetype/ftoutln.h
+include/freetype2/freetype/ftparams.h
+include/freetype2/freetype/ftpfr.h
+include/freetype2/freetype/ftrender.h
+include/freetype2/freetype/ftsizes.h
+include/freetype2/freetype/ftsnames.h
+include/freetype2/freetype/ftstroke.h
+include/freetype2/freetype/ftsynth.h
+include/freetype2/freetype/ftsystem.h
+include/freetype2/freetype/fttrigon.h
+include/freetype2/freetype/fttypes.h
+include/freetype2/freetype/ftwinfnt.h
+include/freetype2/freetype/t1tables.h
+include/freetype2/freetype/ttnameid.h
+include/freetype2/freetype/tttables.h
+include/freetype2/freetype/tttags.h
+include/freetype2/ft2build.h
+lib/32/libfreetype.la
+lib/32/pkgconfig/freetype2.pc
+man/man1/freetype-config.1
+share/aclocal/freetype2.m4
diff --git a/freetype2-32/buildlink3.mk b/freetype2-32/buildlink3.mk
new file mode 100644
index 0000000000..6ea65607ed
--- /dev/null
+++ b/freetype2-32/buildlink3.mk
@@ -0,0 +1,37 @@
+# $NetBSD: buildlink3.mk,v 1.47 2018/01/07 13:04:14 rillig Exp $
+
+BUILDLINK_TREE+=	compat32_freetype2
+
+.if !defined(COMPAT32_FREETYPE2_BUILDLINK3_MK)
+COMPAT32_FREETYPE2_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.compat32_freetype2+=	compat32_freetype2>=2.4.5
+BUILDLINK_ABI_DEPENDS.compat32_freetype2+=	compat32_freetype2>=2.4.11
+BUILDLINK_PKGSRCDIR.compat32_freetype2?=	../../wip/freetype2-32
+BUILDLINK_INCDIRS.compat32_freetype2?=		include/freetype2
+BUILDLINK_LIBDIRS.compat32_freetype2?=		lib/32
+
+BUILDLINK_FILES.compat32_freetype2+=	bin/freetype-config
+
+FREETYPE_CONFIG?=	${BUILDLINK_PREFIX.freetype2}/bin/freetype-config
+CONFIGURE_ENV+=		FREETYPE_CONFIG=${FREETYPE_CONFIG:Q}
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+
+# pkgbase := freetype2
+# .include "../../mk/pkg-build-options.mk"
+
+# .if !empty(PKG_BUILD_OPTIONS.freetype2:Mpng)
+# CHECK_BUILTIN.freetype2:=	yes
+# .include "../../graphics/freetype2/builtin.mk"
+# CHECK_BUILTIN.freetype2:=	no
+
+# .  if empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
+# .    include "../../graphics/png/buildlink3.mk"
+# .  endif
+# .endif
+
+.endif # COMPAT32_FREETYPE2_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-compat32_freetype2
diff --git a/freetype2-32/builtin.mk b/freetype2-32/builtin.mk
new file mode 100644
index 0000000000..4b9ce9e6da
--- /dev/null
+++ b/freetype2-32/builtin.mk
@@ -0,0 +1,98 @@
+# $NetBSD: builtin.mk,v 1.18 2018/05/04 08:40:11 adam Exp $
+
+BUILTIN_PKG:=	freetype2
+
+BUILTIN_FIND_FILES_VAR:=		H_FREETYPE2 H_FREETYPE2_NEW
+BUILTIN_FIND_FILES.H_FREETYPE2=		${X11BASE}/include/freetype2/freetype/freetype.h
+BUILTIN_FIND_FILES.H_FREETYPE2_NEW=	${X11BASE}/include/freetype2/freetype.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.freetype2)
+.  if empty(H_FREETYPE2:M__nonexistent__)
+IS_BUILTIN.freetype2=	yes
+.  elif empty(H_FREETYPE2_NEW:M__nonexistent__)
+IS_BUILTIN.freetype2=	yes
+H_FREETYPE2:=		${H_FREETYPE2_NEW}
+.  else
+IS_BUILTIN.freetype2=	no
+.  endif
+.endif
+MAKEVARS+=		IS_BUILTIN.freetype2
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.freetype2) && \
+    !empty(IS_BUILTIN.freetype2:M[yY][eE][sS]) && \
+    empty(H_FREETYPE2:M__nonexistent__)
+BUILTIN_VERSION.freetype2!=						\
+	${AWK} 'BEGIN { p = ".0" }					\
+		/\#define[ 	]*FREETYPE_MAJOR/ { M = $$3 }		\
+		/\#define[ 	]*FREETYPE_MINOR/ { m = "."$$3 }	\
+		/\#define[ 	]*FREETYPE_PATCH/ { p = "."$$3 }	\
+		END { printf "%s%s%s\n", M, m, p }'			\
+		${H_FREETYPE2}
+BUILTIN_PKG.freetype2=	freetype2-${BUILTIN_VERSION.freetype2}
+.endif
+MAKEVARS+=	BUILTIN_PKG.freetype2
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.freetype2)
+.  if ${PREFER.freetype2} == "pkgsrc"
+USE_BUILTIN.freetype2=	no
+.  else
+USE_BUILTIN.freetype2=	${IS_BUILTIN.freetype2}
+.    if defined(BUILTIN_PKG.freetype2) && \
+        !empty(IS_BUILTIN.freetype2:M[yY][eE][sS])
+USE_BUILTIN.freetype2=	yes
+.      for _dep_ in ${BUILDLINK_API_DEPENDS.freetype2}
+.        if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
+USE_BUILTIN.freetype2!=							\
+	if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.freetype2}; then \
+		${ECHO} yes;						\
+	else								\
+		${ECHO} no;						\
+	fi
+.        endif
+.      endfor
+.    endif
+.  endif  # PREFER.freetype2
+.endif
+MAKEVARS+=	USE_BUILTIN.freetype2
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+
+.include "../../mk/x11.builtin.mk"
+
+CHECK_BUILTIN.freetype2?=	no
+.if !empty(CHECK_BUILTIN.freetype2:M[nN][oO])
+
+.  if !empty(USE_BUILTIN.freetype2:M[nN][oO])
+BUILDLINK_API_DEPENDS.freetype2+=	freetype2>=2.1.3
+.  else
+.    if !empty(MACHINE_PLATFORM:MNetBSD-[67].*-*) && \
+	(("${BUILTIN_VERSION.freetype2}" == "2.4.5") || \
+	("${BUILTIN_VERSION.freetype2}" == "2.5.3"))
+_FT2_VER_MAP.2.5.3=17.2.11
+_FT2_VER_MAP.2.4.5=13.0.7
+SUBST_CLASSES+=		fx-ft2-pc-version
+SUBST_STAGE.fx-ft2-pc-version=	post-wrapper
+SUBST_MESSAGE.fx-ft2-pc-version=Fixes wrong module version in freetype2.pc
+SUBST_FILES.fx-ft2-pc-version=	${BUILDLINK_X11_DIR}/lib/pkgconfig/freetype2.pc
+SUBST_SED.fx-ft2-pc-version=	-e 's|^\(Version:\).*|\1 ${_FT2_VER_MAP.${BUILTIN_VERSION.freetype2}}|'
+.    endif
+.  endif
+
+.endif	# CHECK_BUILTIN.freetype2
diff --git a/freetype2-32/options.mk b/freetype2-32/options.mk
new file mode 100644
index 0000000000..8fd5b75a5b
--- /dev/null
+++ b/freetype2-32/options.mk
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.4 2016/09/12 18:06:44 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.freetype2
+PKG_SUPPORTED_OPTIONS=	png
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mpng)
+CONFIGURE_ARGS+=	--with-png=yes
+.include "../../graphics/png/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-png=no
+.endif
diff --git a/freetype2-32/patches/patch-builds_unix_freetype-config.in b/freetype2-32/patches/patch-builds_unix_freetype-config.in
new file mode 100644
index 0000000000..45548c45f4
--- /dev/null
+++ b/freetype2-32/patches/patch-builds_unix_freetype-config.in
@@ -0,0 +1,41 @@
+$NetBSD: patch-builds_unix_freetype-config.in,v 1.1 2017/09/18 16:54:06 adam Exp $
+
+Do not substitute %PKG_CONFIG% as it ends with temporary DESTDIR.
+
+--- builds/unix/freetype-config.in.orig	2017-09-18 15:52:06.000000000 +0000
++++ builds/unix/freetype-config.in
+@@ -14,7 +14,7 @@ export LC_ALL
+ 
+ 
+ # if `pkg-config' is available, use values from `freetype2.pc'
+-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
++pkg-config --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
+ if test $? -eq 0 ; then
+   # note that option `--variable' is not affected by the
+   # PKG_CONFIG_SYSROOT_DIR environment variable
+@@ -23,17 +23,17 @@ if test $? -eq 0 ; then
+     export PKG_CONFIG_SYSROOT_DIR
+   fi
+ 
+-  prefix=`%PKG_CONFIG% --variable prefix freetype2`
+-  exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
++  prefix=`pkg-config --variable prefix freetype2`
++  exec_prefix=`pkg-config --variable exec_prefix freetype2`
+ 
+-  includedir=`%PKG_CONFIG% --variable includedir freetype2`
+-  libdir=`%PKG_CONFIG% --variable libdir freetype2`
++  includedir=`pkg-config --variable includedir freetype2`
++  libdir=`pkg-config --variable libdir freetype2`
+ 
+-  version=`%PKG_CONFIG% --modversion freetype2`
++  version=`pkg-config --modversion freetype2`
+ 
+-  cflags=`%PKG_CONFIG% --cflags freetype2`
+-  dynamic_libs=`%PKG_CONFIG% --libs freetype2`
+-  static_libs=`%PKG_CONFIG% --static --libs freetype2`
++  cflags=`pkg-config --cflags freetype2`
++  dynamic_libs=`pkg-config --libs freetype2`
++  static_libs=`pkg-config --static --libs freetype2`
+ else
+   prefix="%prefix%"
+   exec_prefix="%exec_prefix%"
diff --git a/freetype2-32/patches/patch-builds_unix_unix-cc.in b/freetype2-32/patches/patch-builds_unix_unix-cc.in
new file mode 100644
index 0000000000..0c7ba448fe
--- /dev/null
+++ b/freetype2-32/patches/patch-builds_unix_unix-cc.in
@@ -0,0 +1,34 @@
+$NetBSD: patch-builds_unix_unix-cc.in,v 1.2 2018/05/04 08:40:11 adam Exp $
+
+Provide tag to libtool.
+Use CFLAGS when compiling executables.
+
+--- builds/unix/unix-cc.in.orig	2018-04-22 09:41:36.000000000 +0000
++++ builds/unix/unix-cc.in
+@@ -88,7 +88,7 @@ ANSIFLAGS := @XX_ANSIFLAGS@
+ # C compiler to use -- we use libtool!
+ #
+ CCraw := $(CC)
+-CC    := $(LIBTOOL) --mode=compile $(CCraw)
++CC    := $(LIBTOOL) --tag=CC --mode=compile $(CCraw)
+ 
+ # Resource compiler to use on Cygwin/MinGW, usually windres.
+ #
+@@ -108,14 +108,14 @@ LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@
+ CCraw_build  := @CC_BUILD@	# native CC of building system
+ E_BUILD      := @EXEEXT_BUILD@	# extension for executable on building system
+ EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
+-CCexe        := $(CCraw_build)	# used to compile `apinames' only
++CCexe        := $(CCraw_build) @CFLAGS@	# used to compile `apinames' only
+ 
+ 
+ # Library linking
+ #
+-LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
++LINK_LIBRARY = $(LIBTOOL) --tag=CC --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
+                           -rpath $(libdir) -version-info $(version_info) \
+                           $(LDFLAGS) -no-undefined \
+-                          -export-symbols $(EXPORTS_LIST)
++                          # -export-symbols $(EXPORTS_LIST)
+ 
+ # EOF


Home | Main Index | Thread Index | Old Index