Index: head/audio/klystrack/Makefile =================================================================== --- head/audio/klystrack/Makefile (revision 561915) +++ head/audio/klystrack/Makefile (revision 561916) @@ -1,58 +1,63 @@ # Created by: Emanuel Haupt # $FreeBSD$ PORTNAME= klystrack DISTVERSION= 1.7.6-make-fix-12 DISTVERSIONSUFFIX= -gfe6e746 +PORTREVISION= 1 CATEGORIES= audio MAINTAINER= ehaupt@FreeBSD.org COMMENT= Tracker for making C64/NES/Amiga-style chiptunes LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libasound.so:audio/alsa-lib -USES= compiler:c11 desktop-file-utils dos2unix gmake localbase:ldconfig \ - sdl -DOS2UNIX_FILES= klystron/Makefile klystron/tools/editor/Makefile \ +USES= compiler:c11 desktop-file-utils dos2unix gmake \ + localbase:ldconfig sdl +DOS2UNIX_FILES= klystron/common.mk klystron/Makefile klystron/src/gui/menu.h \ + klystron/tools/editor/Makefile \ klystron/tools/makebundle/Makefile Makefile player/Makefile \ - scancode-tool/Makefile klystron/src/gui/menu.h + scancode-tool/Makefile USE_CSTD= c99 USE_GITHUB= yes GH_ACCOUNT= kometbomb GH_TUPLE= kometbomb:klystron:1074324:klystron/klystron USE_SDL= gfx2 image2 mixer2 sdl2 ttf2 -MAKE_ENV+= V=1 +MAKE_ENV+= CFG=release \ + V=1 ALL_TARGET= build + +CFLAGS+= -fPIC OPTIONS_DEFINE= EXAMPLES post-patch: @${REINPLACE_CMD} -e "s#Default.kt#${DATADIR}/Default.kt#" \ ${WRKSRC}/src/main.c do-install: .for d in bin share/klystrack share/applications share/pixmaps \ share/licenses/klystrack lib/klystrack share/man/man1 ${MKDIR} ${STAGEDIR}${PREFIX}/${d} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/bin.release/klystrack \ ${STAGEDIR}${PREFIX}/bin/klystrack cd ${WRKSRC}/res && \ ${COPYTREE_SHARE} \* ${STAGEDIR}/${PREFIX}/lib/klystrack/res/ cd ${WRKSRC}/key && \ ${COPYTREE_SHARE} \* ${STAGEDIR}/${PREFIX}/lib/klystrack/key/ cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}/${EXAMPLESDIR} ${INSTALL_MAN} ${WRKSRC}/doc/klystrack.1 \ ${STAGEDIR}${MANPREFIX}/share/man/man1 ${INSTALL_DATA} ${WRKSRC}/doc/Default.kt \ ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/linux/klystrack.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKSRC}/icon/256x256.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/klystrack.png .include Index: head/audio/klystrack/files/patch-klystron_tools_editor_Makefile =================================================================== --- head/audio/klystrack/files/patch-klystron_tools_editor_Makefile (revision 561915) +++ head/audio/klystrack/files/patch-klystron_tools_editor_Makefile (nonexistent) @@ -1,45 +0,0 @@ ---- klystron/tools/editor/Makefile.orig 2021-01-08 17:05:12 UTC -+++ klystron/tools/editor/Makefile -@@ -1,7 +1,8 @@ -+CC ?= gcc - TARGET=editor.exe - VPATH=src:src - ECHO = echo --CFG = debug -+CFG = release - MACHINE = -march=pentium2 - - # The directories containing the source files, separated by ':' -@@ -28,8 +29,8 @@ Group0_OBJ = $(patsubst %.c, objs.$(CFG)/Group0_%.o, \ - - # What compiler to use for generating dependencies: - # it will be invoked with -MM --CXX = gcc -std=c99 --no-strict-aliasing --CXXDEP = gcc -E -std=c99 -+CXX = $(CC) -std=c99 --no-strict-aliasing -+CXXDEP = $(CC) -E -std=c99 - - # What include flags to pass to the compiler - -@@ -39,7 +40,7 @@ ifdef COMSPEC - CXXFLAGS += -mthreads - INCLUDEFLAGS := -I ../Common -I src -I /MinGW/include/SDL2 -I ../../src - else -- INCLUDEFLAGS := `sdl-config --cflags` -U_FORTIFY_SOURCE -I ../../src -+ INCLUDEFLAGS := `sdl2-config --cflags` -U_FORTIFY_SOURCE -I ../../src - endif - - LDFLAGS = -L ../../bin.$(CFG) -lengine_gfx -lengine_util -lengine_gui -lmingw32 -lSDL2_image -lSDLmain -lSDL2 -lconfig -@@ -49,10 +50,10 @@ ifeq ($(CFG),debug) - CXXFLAGS += -O3 -g -Wall ${INCLUDEFLAGS} -DDEBUG - else - ifeq ($(CFG),profile) --CXXFLAGS += -O3 -g -pg -Wall ${INCLUDEFLAGS} -+CXXFLAGS += -pg -Wall ${INCLUDEFLAGS} - else - ifeq ($(CFG),release) --CXXFLAGS += -O3 -g -Wall ${INCLUDEFLAGS} -+CXXFLAGS += -Wall ${INCLUDEFLAGS} - else - @$(ECHO) "Invalid configuration "$(CFG)" specified." - @$(ECHO) "You must specify a configuration when " Property changes on: head/audio/klystrack/files/patch-klystron_tools_editor_Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/audio/klystrack/files/patch-player_Makefile =================================================================== --- head/audio/klystrack/files/patch-player_Makefile (revision 561915) +++ head/audio/klystrack/files/patch-player_Makefile (nonexistent) @@ -1,16 +0,0 @@ ---- player/Makefile.orig 2021-01-08 17:05:12 UTC -+++ player/Makefile -@@ -1,10 +1,11 @@ -+CC ?= gcc - ifdef COMSPEC - SDL := -lSDL2main -lSDL2 -I /mingw/include/SDL2 - LIBS := -lmingw32 -lengine_snd - else -- SDL := `sdl-config --libs` -+ SDL := `sdl2-config --libs` - LIBS := -lengine_snd - endif - - player.exe: player.c -- gcc -DUSESDLMUTEXES -DSTEREOOUTPUT -DENABLEAUDIODUMP -DNOSDL_MIXER -DDEBUG -o player.exe player.c -g -Wall $(LIBS) $(SDL) -I ../../klystron/src -L ../../klystron/bin.debug -+ $(CC) $(CFLAGS) $(LDFLAGS) -DUSESDLMUTEXES -DSTEREOOUTPUT -DENABLEAUDIODUMP -DNOSDL_MIXER -DDEBUG -o player.exe player.c -g -Wall $(LIBS) $(SDL) -I ../../klystron/src Property changes on: head/audio/klystrack/files/patch-player_Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/audio/klystrack/files/patch-scancode-tool_Makefile =================================================================== --- head/audio/klystrack/files/patch-scancode-tool_Makefile (revision 561915) +++ head/audio/klystrack/files/patch-scancode-tool_Makefile (nonexistent) @@ -1,8 +0,0 @@ ---- scancode-tool/Makefile.orig 2021-01-08 16:47:36 UTC -+++ scancode-tool/Makefile -@@ -1,4 +1,4 @@ --CC = gcc -s -Ic:/MinGW/include/SDL2 -+CC ?= gcc - EXE = scancode.exe - - $(EXE): scancode.c Property changes on: head/audio/klystrack/files/patch-scancode-tool_Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/audio/klystrack/files/patch-Makefile =================================================================== --- head/audio/klystrack/files/patch-Makefile (revision 561915) +++ head/audio/klystrack/files/patch-Makefile (revision 561916) @@ -1,79 +1,49 @@ ---- Makefile.orig 2021-01-08 17:05:12 UTC +--- Makefile.orig 2021-01-18 12:13:12 UTC +++ Makefile -@@ -1,7 +1,8 @@ -+MAKE ?= make +@@ -1,7 +1,7 @@ TARGET := klystrack KLYSTRON=klystron ECHO := echo -CFG := debug -+CFG := release ++CFG ?= debug EXE := bin.$(CFG)/$(TARGET) MACHINE := NSIS := C:/program\ files\ \(x86\)/nsis/makensis.exe -V2 -NOCD -@@ -10,7 +11,7 @@ MAKEBUNDLE := $(KLYSTRON)/tools/bin/makebundle.exe +@@ -10,7 +10,7 @@ MAKEBUNDLE := $(KLYSTRON)/tools/bin/makebundle.exe UPLOAD := cmd.exe /c upload.bat DLLS := zip/data/SDL2_image.dll zip/data/SDL2.dll EXT := .c -CC := gcc +CC ?= gcc CDEP := $(CC) -E -MM ARCHIVE := klystrack INSTALLER := klystrack.exe -@@ -69,10 +70,10 @@ ifeq ($(CFG),debug) - CFLAGS += -g -Wall -DDEBUG -fno-inline - else - ifeq ($(CFG),profile) -- CFLAGS += -O3 -pg -Wall -+ CFLAGS += -pg -Wall +@@ -21,7 +21,7 @@ REV := cp -f + + PREFIX ?= /usr + BINDIR = $(PREFIX)/bin +-CFLAGS := $(MACHINE) -ftree-vectorize -std=gnu99 -Wno-strict-aliasing ++CFLAGS ?= $(MACHINE) -ftree-vectorize -std=gnu99 -Wno-strict-aliasing + + ifdef COMSPEC + # Compiling for Windows +@@ -72,7 +72,7 @@ else + CFLAGS += -O3 -pg -Wall else ifeq ($(CFG),release) - CFLAGS += -O3 -Wall -s + CFLAGS += -Wall ifdef COMSPEC CFLAGS += -mwindows endif -@@ -136,8 +137,8 @@ endef +@@ -136,8 +136,8 @@ endef build: Makefile src/version.h src/version_number.h $(Q)touch src/version - $(Q)$(MAKE) -C $(KLYSTRON) CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" - $(Q)$(MAKE) all CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" -+ $(Q)$(MAKE_ENV) $(MAKE) -C $(KLYSTRON) CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" -+ $(Q)$(MAKE_ENV) $(MAKE) all CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" ++ $(Q)$(MAKE_ENV)$(MAKE) -C $(KLYSTRON) CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" ++ $(Q)$(MAKE_ENV)$(MAKE) all CFG=$(CFG) EXTFLAGS="$(EXTFLAGS)" src/version.h: src/version $(Q)echo '#ifndef VERSION_H' > ./src/version.h -@@ -173,8 +174,8 @@ endif - all: $(EXE) $(THEMES) - - zip: doc/* $(THEMES) $(DLLS) examples/instruments/* examples/songs/* $(DLLS) -- $(Q)$(MAKE) -C $(KLYSTRON) CFG=release EXTFLAGS="$(EXTFLAGS)" -- $(Q)$(MAKE) build CFG=release -+ $(Q)$(MAKE_ENV) $(MAKE) -C $(KLYSTRON) CFG=release EXTFLAGS="$(EXTFLAGS)" -+ $(Q)$(MAKE_ENV) $(MAKE) build CFG=release - $(Q)mkdir -p zip/data/res - $(Q)mkdir -p zip/data/examples/songs - $(Q)mkdir -p zip/data/examples/songs/n00bstar-examples -@@ -221,18 +222,18 @@ release: bin.release/$(TARGET) - @$(ECHO) "Building release -->" - - $(DESTDIR)$(BINDIR)/$(TARGET): $(EXE) -- install -D -m 755 $< $@ -+ install -s -m 755 $< $@ - - $(DESTDIR)$(RES_PATH)/res/%: res/% -- install -D -m 644 $< $@ -+ install -m 644 $< $@ - - $(DESTDIR)$(RES_PATH)/key/%: key/% -- install -D -m 644 $< $@ -+ install -m 644 $< $@ - - install: $(EXE:bin.$(CFG)/%=$(DESTDIR)$(BINDIR)/%) $(RESOURCES:res/%=$(DESTDIR)$(RES_PATH)/res/%) $(KEYS:key/%=$(DESTDIR)$(RES_PATH)/key/%) - - #bin.release/$(TARGET): --# $(Q)make CFG=release -+# $(Q)$(MAKE) CFG=release - - ifneq ($(MAKECMDGOALS),clean) - -include $(DEPS) Index: head/audio/klystrack/files/patch-klystron_Makefile =================================================================== --- head/audio/klystrack/files/patch-klystron_Makefile (revision 561915) +++ head/audio/klystrack/files/patch-klystron_Makefile (revision 561916) @@ -1,60 +1,69 @@ ---- klystron/Makefile.orig 2021-01-08 20:34:24 UTC +--- klystron/Makefile.orig 2021-01-18 12:22:06 UTC +++ klystron/Makefile -@@ -1,7 +1,8 @@ -+MAKE ?= make +@@ -1,9 +1,10 @@ TARGET=engine VPATH=src:src ECHO = echo -CFG = debug -+CFG = release ++CFG ?= debug REV = cp -f MACHINE = ++CC ?= gcc -@@ -27,9 +28,10 @@ lib_SRC = $(notdir ${wildcard src/lib/*.c}) + include common.mk + +@@ -27,8 +28,8 @@ lib_SRC = $(notdir ${wildcard src/lib/*.c}) lib_DEP = $(patsubst %.c, deps/lib_$(CFG)_%.d, ${lib_SRC}) lib_OBJ = $(patsubst %.c, objs.$(CFG)/lib_%.o, ${lib_SRC}) -CC = gcc -shared -std=gnu99 -Wno-strict-aliasing -CDEP = gcc -E -std=gnu99 -+CC ?= gcc ++CC := $(CC) -std=gnu99 -Wno-strict-aliasing ++CDEP := $(CC) -E -std=gnu99 -+CDEP = $(CC) -shared -E -std=gnu99 -+ ifndef CFLAGS CFLAGS = $(MACHINE) -ftree-vectorize - endif -@@ -41,10 +43,10 @@ ifeq ($(CFG),debug) - CFLAGS += -O3 -g -Wall ${INCLUDEFLAGS} -DDEBUG -fno-inline - else - ifeq ($(CFG),profile) -- CFLAGS += -O3 -pg -Wall ${INCLUDEFLAGS} -+ CFLAGS += -pg -Wall ${INCLUDEFLAGS} +@@ -44,10 +45,10 @@ else + CFLAGS += -O3 -pg -Wall ${INCLUDEFLAGS} else ifeq ($(CFG),release) - CFLAGS += -O3 -Wall ${INCLUDEFLAGS} -s + CFLAGS += -Wall ${INCLUDEFLAGS} else ifeq ($(CFG),size) - CFLAGS += -Os -Wall ${INCLUDEFLAGS} -s -ffast-math -fomit-frame-pointer -DREDUCESIZE -@@ -73,7 +75,7 @@ build: Makefile +- CFLAGS += -Os -Wall ${INCLUDEFLAGS} -s -ffast-math -fomit-frame-pointer -DREDUCESIZE ++ CFLAGS += -Os -Wall ${INCLUDEFLAGS} -ffast-math -fomit-frame-pointer -DREDUCESIZE + else + @$(ECHO) "Invalid configuration "$(CFG)" specified." + @$(ECHO) "You must specify a configuration when " +@@ -73,7 +74,7 @@ build: Makefile $(Q)echo '"' >> ./src/version.h $(Q)echo '#define KLYSTRON_VERSION_STRING "klystron " KLYSTRON_REVISION' >> ./src/version.h $(Q)echo '#endif' >> ./src/version.h - make all CFG=$(CFG) + $(MAKE) all CFG=$(CFG) all: bin.$(CFG)/lib${TARGET}_snd.a bin.$(CFG)/lib${TARGET}_gfx.a bin.$(CFG)/lib${TARGET}_util.a bin.$(CFG)/lib${TARGET}_gui.a tools -@@ -208,10 +210,10 @@ ifneq ($(MAKECMDGOALS),clean) +@@ -121,7 +122,7 @@ endif + bin.$(CFG)/ksnd.dll: objs.$(CFG)/lib_ksnd.o ${snd_OBJ} src/lib/ksnd.def | inform + $(MSG) "Linking ksnd.dll..." + $(Q)mkdir -p bin.$(CFG) +- $(Q)$(CC) -shared -o $@ objs.$(CFG)/lib_ksnd.o src/lib/ksnd.def ${snd_OBJ} $(CFLAGS) $(INCLUDEFLAGS) -DDLLEXPORT -Wl,--out-implib,bin.$(CFG)/libksnd.a ++ $(Q)$(CC) -o $@ objs.$(CFG)/lib_ksnd.o src/lib/ksnd.def ${snd_OBJ} $(CFLAGS) $(INCLUDEFLAGS) -DDLLEXPORT -Wl,--out-implib,bin.$(CFG)/libksnd.a + ifdef COMSPEC + $(MSG) "Building ksnd.lib..." + @-lib /DEF:src/lib/ksnd.def /OUT:bin.$(CFG)/ksnd.lib +@@ -208,10 +209,10 @@ ifneq ($(MAKECMDGOALS),clean) endif tools/bin/makebundle.exe: tools/makebundle/*.c - make -C tools/makebundle -+ $(MAKE) -C tools/makebundle ++ $(MAKE_ENV) $(MAKE) -C tools/makebundle ifdef COMSPEC tools/bin/editor.exe: tools/editor/src/* - make -C tools/editor + $(MAKE) -C tools/editor cp tools/editor/bin.$(CFG)/editor.exe tools/bin/editor.exe endif Index: head/audio/klystrack/files/patch-klystron_common.mk =================================================================== --- head/audio/klystrack/files/patch-klystron_common.mk (nonexistent) +++ head/audio/klystrack/files/patch-klystron_common.mk (revision 561916) @@ -0,0 +1,8 @@ +--- klystron/common.mk.orig 2021-01-18 12:35:42 UTC ++++ klystron/common.mk +@@ -1,3 +1,5 @@ ++MAKE ?= make ++ + # make it possible to do a verbose build by running `make V=1` + ifeq ($(V),1) + Q= Property changes on: head/audio/klystrack/files/patch-klystron_common.mk ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/klystrack/files/patch-klystron_tools_makebundle_Makefile =================================================================== --- head/audio/klystrack/files/patch-klystron_tools_makebundle_Makefile (revision 561915) +++ head/audio/klystrack/files/patch-klystron_tools_makebundle_Makefile (revision 561916) @@ -1,14 +1,15 @@ ---- klystron/tools/makebundle/Makefile.orig 2021-01-08 17:05:12 UTC +--- klystron/tools/makebundle/Makefile.orig 2021-01-18 11:01:30 UTC +++ klystron/tools/makebundle/Makefile -@@ -1,3 +1,4 @@ -+CC ?= gcc +@@ -1,4 +1,5 @@ TARGET = ../bin/makebundle.exe ++CC ?= gcc ifdef COMSPEC + SDL = -I /mingw/include/sdl @@ -8,4 +9,4 @@ endif $(TARGET): makebundle.c ../../src/util/bundle.h @mkdir -p ../bin - gcc -o $(TARGET) -D_XOPEN_SOURCE makebundle.c -std=c99 -I ../../src $(SDL) -Wall -O3 \ No newline at end of file -+ $(CC) -o $(TARGET) -D_XOPEN_SOURCE makebundle.c -std=c99 -I ../../src $(SDL) -Wall ++ $(CC) $(CFLAGS) -o $(TARGET) -D_XOPEN_SOURCE makebundle.c -std=c99 -I ../../src $(SDL) -Wall