From 39571db430cc096197d9a9c9b2d013a1541ce99a Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 3 Oct 2001 16:08:48 +0000 Subject: [PATCH] - build on archs other than i386 - honor CC, CFLAGS --- misc/cdrdao/Makefile | 9 +++- .../patch-scsilib_RULES_i386-openbsd-cc_rul | 47 +++++++++++++++++++ .../patches/patch-scsilib_RULES_rules1_top | 12 +++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 misc/cdrdao/patches/patch-scsilib_RULES_i386-openbsd-cc_rul create mode 100644 misc/cdrdao/patches/patch-scsilib_RULES_rules1_top diff --git a/misc/cdrdao/Makefile b/misc/cdrdao/Makefile index af961392457..feed1a2bbba 100644 --- a/misc/cdrdao/Makefile +++ b/misc/cdrdao/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2001/09/28 06:02:14 pvalchev Exp $ +# $OpenBSD: Makefile,v 1.13 2001/10/03 16:08:48 naddy Exp $ COMMENT= "write audio/data CD-Rs in disk-at-once mode" @@ -24,6 +24,13 @@ USE_GMAKE= Yes CONFIGURE_STYLE= autoconf dest MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/paranoia ${WRKSRC}/scsilib CONFIGURE_ARGS+= --with-posix-threads=no +MAKE_ENV= CCOM="${CC}" + +.if ${MACHINE} != "i386" || ${CC} != "cc" +pre-configure: + @ln -sf ${WRKSRC}/scsilib/RULES/i386-openbsd-cc.rul \ + ${WRKSRC}/scsilib/RULES/${MACHINE}-openbsd-${CC}.rul +.endif post-install: @strip ${PREFIX}/bin/cdrdao diff --git a/misc/cdrdao/patches/patch-scsilib_RULES_i386-openbsd-cc_rul b/misc/cdrdao/patches/patch-scsilib_RULES_i386-openbsd-cc_rul new file mode 100644 index 00000000000..fa2c64b832d --- /dev/null +++ b/misc/cdrdao/patches/patch-scsilib_RULES_i386-openbsd-cc_rul @@ -0,0 +1,47 @@ +$OpenBSD: patch-scsilib_RULES_i386-openbsd-cc_rul,v 1.1 2001/10/03 16:08:48 naddy Exp $ +--- scsilib/RULES/i386-openbsd-cc.rul.orig Sun Apr 29 10:44:45 2001 ++++ scsilib/RULES/i386-openbsd-cc.rul Mon Oct 1 20:04:09 2001 +@@ -24,13 +24,13 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg + ########################################################################### + + CPPFLAGS= $(CPPOPTS) $(CPPOPTX) +-CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(COPTX) ++CFLAGS+= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(COPTX) + + CPPOPTS= -I. -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(OSDEFS) + COPTS= + CWOPTS= -Wall -Wtraditional \ + -Wshadow -Wmissing-prototypes -Wstrict-prototypes +-COPTOPT= -O ++COPTOPT= + KDEFINES= -DKERNEL -D_KERNEL + COPTDYN= -fpic + COPTGPROF= -pg +@@ -47,7 +47,7 @@ LIB_KVM= + + LIBS_PATH= -L$(OLIBSDIR) + +-LDFLAGS= $(LDOPTS) $(LDOPTX) ++LDFLAGS+= $(LDOPTS) $(LDOPTX) + LDLIBS= $(LIBS) $(LIBX) + + #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) +@@ -57,14 +57,14 @@ LNDYNLIB= @$(SYMLINK) $(TARGET) $(PTARGE + + FLOAT_OPTIONS= + +-CC= @echo " ==> COMPILING \"$@\""; gcc +-LDCC= @echo " ==> LINKING \"$@\""; gcc +-DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc ++CC= @echo " ==> COMPILING \"$@\""; $(CCOM) ++LDCC= @echo " ==> LINKING \"$@\""; $(CCOM) ++DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CCOM) + RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib + ARFLAGS= cr + LORDER= lorder + TSORT= tsort + + RMDEP= : +-MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M ++MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CCOM) -M + MKDEP_OUT= diff --git a/misc/cdrdao/patches/patch-scsilib_RULES_rules1_top b/misc/cdrdao/patches/patch-scsilib_RULES_rules1_top new file mode 100644 index 00000000000..8332d20c937 --- /dev/null +++ b/misc/cdrdao/patches/patch-scsilib_RULES_rules1_top @@ -0,0 +1,12 @@ +$OpenBSD: patch-scsilib_RULES_rules1_top,v 1.1 2001/10/03 16:08:48 naddy Exp $ +--- scsilib/RULES/rules1.top.orig Sun Apr 29 10:44:46 2001 ++++ scsilib/RULES/rules1.top Mon Oct 1 20:04:22 2001 +@@ -186,7 +186,7 @@ __PARCH= $(_PARCH:$(_UNIQ)=$(PARCH_DEF)) + PARCH= $(__PARCH:$(_UNIQ)%=%) + + #OARCH= $(MARCH)$(-O_ARCH)-$(C_ARCH) +-OARCH= $(PARCH)$(-O_ARCH)-$(C_ARCH) ++OARCH= $(K_ARCH)$(-O_ARCH)-$(C_ARCH) + XARCH= $(K_ARCH)$(-O_ARCH)-$(C_ARCH) + .print: + echo $(XP_ARCH) $(P_ARCH)