opnsense-ports/biology/bcftools/files/patch-Makefile
Franco Fichtner 643fd91f32 */*: sync with upstream
Taken from: HardenedBSD
2017-10-25 21:27:38 +02:00

79 lines
2.6 KiB
Text

--- Makefile.orig 2017-09-28 11:22:48 UTC
+++ Makefile
@@ -22,10 +22,10 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-CC = gcc
-CPPFLAGS =
-CFLAGS = -g -Wall -Wc++-compat -O2
-LDFLAGS =
+CC ?= cc
+CPPFLAGS +=
+CFLAGS += -Wall
+LDFLAGS +=
LIBS =
DYNAMIC_FLAGS = -rdynamic
@@ -42,26 +42,25 @@ OBJS = main.o vcfindex.o tabix.o \
vcfsort.o \
ccall.o em.o prob1.o kmin.o # the original samtools calling
-prefix = /usr/local
+prefix = ${PREFIX}
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
libexecdir = $(exec_prefix)/libexec
-mandir = $(prefix)/share/man
+mandir = $(prefix)/man
man1dir = $(mandir)/man1
# Installation location for $(PLUGINS)
plugindir = $(libexecdir)/bcftools
pluginpath = $(plugindir)
# Installation location for $(MISC_PROGRAMS) and $(MISC_SCRIPTS)
-misc_bindir = $(bindir)
+misc_bindir = $(bindir)/samtools_misc
MKDIR_P = mkdir -p
-INSTALL = install -p
-INSTALL_DATA = $(INSTALL) -m 644
-INSTALL_DIR = $(MKDIR_P) -m 755
-INSTALL_MAN = $(INSTALL_DATA)
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_SCRIPT = $(INSTALL_PROGRAM)
+INSTALL_DATA = ${BSD_INSTALL_DATA}
+INSTALL_DIR = $(MKDIR_P)
+INSTALL_MAN = ${BSD_INSTALL_MAN}
+INSTALL_PROGRAM = ${BSD_INSTALL_PROGRAM}
+INSTALL_SCRIPT = ${BSD_INSTALL_SCRIPT}
PROGRAMS = bcftools
MISC_SCRIPTS = \
@@ -77,7 +76,7 @@ all: $(PROGRAMS) $(TEST_PROGRAMS) plugin
ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LDFLAGS)
-ALL_LIBS = -lz -ldl $(LIBS)
+ALL_LIBS = -lz $(LIBS)
# Usually config.mk and config.h are generated by running configure
# or config.status, but if those aren't used create defaults here.
@@ -131,7 +130,7 @@ print-version:
ifdef USE_GPL
main.o : EXTRA_CPPFLAGS += -DUSE_GPL
OBJS += polysomy.o peakfit.o
- GSL_LIBS ?= -lgsl -lcblas
+ GSL_LIBS ?= -lgsl -lgslcblas
endif
bcftools: $(OBJS) $(HTSLIB)
@@ -273,7 +272,7 @@ docs: doc/bcftools.1 doc/bcftools.html
# Since there is no make dependency, bcftools.1 can be out-of-date and
# make docs can be run to update if asciidoc is available
install: $(PROG) $(PLUGINS)
- $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir)
+ $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(misc_bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir)
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) $(MISC_SCRIPTS) $(DESTDIR)$(misc_bindir)
$(INSTALL_MAN) doc/bcftools.1 $(DESTDIR)$(man1dir)