tweak imake-cf: use LOCALBASE more consistently (some of these should be

PREFIX, to look up)

Also USE_GROFF to not require groff for generated rules.

not really used, according to Ingo, but won't hurt...
This commit is contained in:
espie 2018-08-09 17:43:00 +00:00
parent c4a1c5c02b
commit 7065c9344a
3 changed files with 43 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 2017/02/25 22:08:41 naddy Exp $
# $OpenBSD: Makefile,v 1.13 2018/08/09 17:43:00 espie Exp $
PKG_ARCH = *
COMMENT = config files for imake
@ -6,7 +6,7 @@ CATEGORIES = devel x11
V = 1.0.6
DISTNAME = xorg-cf-files-${V}
PKGNAME = imake-cf-${V}
REVISION = 1
REVISION = 2
MASTER_SITES = ${MASTER_SITE_XORG:=util/}
PERMIT_PACKAGE_CDROM = Yes
@ -19,12 +19,12 @@ XCONFDIR = ${PREFIX}/lib/X11/config
NO_TEST= Yes
do-build:
sed ${SUBST} <${WRKSRC}/site.def.in >${WRKSRC}/site.def
pre-configure:
${SUBST_CMD} ${WRKSRC}/OpenBSD.cf
do-build:
sed ${SUBST} <${WRKSRC}/site.def.in >${WRKSRC}/site.def
do-install:
${INSTALL_DATA_DIR} ${XCONFDIR}
for f in ${WRKSRC}/*.{cf,def,rules,tmpl}; do \

View File

@ -1,20 +1,39 @@
$OpenBSD: patch-OpenBSD_cf,v 1.7 2017/02/25 22:08:42 naddy Exp $
--- OpenBSD.cf.orig Tue Dec 22 02:28:02 2015
+++ OpenBSD.cf Sat Feb 25 23:01:15 2017
@@ -26,10 +26,12 @@ XCOMM operating system: OSName (OSMajorVersion./**/OS
#define LibDir /usr/local/lib/X11
#define UsrLibDir /usr/local/lib
#define ManDirectoryRoot /usr/local/man
$OpenBSD: patch-OpenBSD_cf,v 1.8 2018/08/09 17:43:00 espie Exp $
Index: OpenBSD.cf
--- OpenBSD.cf.orig
+++ OpenBSD.cf
@@ -22,18 +22,20 @@ XCOMM operating system: OSName (OSMajorVersion./**/OS
#ifdef Ports
-#define BinDir /usr/local/bin
-#define LibDir /usr/local/lib/X11
-#define UsrLibDir /usr/local/lib
-#define ManDirectoryRoot /usr/local/man
-#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib
-#define XpmLibDir /usr/X11R6/lib
-#define XpmIncDir /usr/X11R6/include
-#define ConfigDir /usr/X11R6/lib/X11/config
-#define IncRoot /usr/local/include
-#define TopXInclude -I/usr/X11R6/include
+#define BinDir ${LOCALBASE}/bin
+#define LibDir ${LOCALBASE}/lib/X11
+#define UsrLibDir ${LOCALBASE}/lib
+#define ManDirectoryRoot ${LOCALBASE}/man
+#define FontDir ${LOCALBASE}/share/fonts
+#define FontEncDir ${LOCALBASE}/share/fonts/encodings
#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib
#define XpmLibDir /usr/X11R6/lib
#define XpmIncDir /usr/X11R6/include
-#define ConfigDir /usr/X11R6/lib/X11/config
+#define LdPreLib -L${X11BASE}/lib -L${LOCALBASE}/lib
+#define XpmLibDir ${X11BASE}/lib
+#define XpmIncDir ${X11BASE}/include
+#define ConfigDir ${LOCALBASE}/lib/X11/config
#define IncRoot /usr/local/include
#define TopXInclude -I/usr/X11R6/include
+#define IncRoot ${LOCALBASE}/include
+#define TopXInclude -I${X11BASE}/include
#define ImakeCmd imake -DPorts
-#define DocDir /usr/local/share/doc
+#define DocDir ${LOCALBASE}/share/doc
#define BuildHtmlManPages NO
#endif
@@ -172,6 +174,9 @@ XCOMM operating system: OSName (OSMajorVersion./**/OS
#ifndef CcCmd
#define CcCmd cc
@ -32,7 +51,7 @@ $OpenBSD: patch-OpenBSD_cf,v 1.7 2017/02/25 22:08:42 naddy Exp $
-#define NeqnCmd neqn -Tlatin1
-#define NroffCmd nroff -Tlatin1
-#define EqnCmd eqn -Tps
+#ifdef Ports
+#ifdef UseGroff
+# define NroffCmd ${LOCALBASE}/bin/nroff -Tascii -c
+# define TroffCmd ${LOCALBASE}/bin/nroff -Tps
+# define HTMLroffCmd ${LOCALBASE}/bin/nroff -Thtml

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: imake.port.mk,v 1.9 2016/04/26 10:56:59 sthen Exp $
# $OpenBSD: imake.port.mk,v 1.10 2018/08/09 17:43:00 espie Exp $
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
# This file is in the public domain.
@ -11,6 +11,10 @@ INSTALL_TARGET += install.man
XMKMF ?= xmkmf -a
XMKMF += -DPorts
.if ${USE_GROFF:L} == "yes"
XMKMF += -DUseGroff
.endif
.if !exists(${X11BASE})
IGNORE = "uses imake, but ${X11BASE} not found"
.endif