From: Jag Talon Subject: [WIP] adding a minivmac-ii package? To: ports@openbsd.org Date: Mon, 29 Jul 2024 20:02:41 -0400 Hello, I think I'm confused about MULTI_PACKAGES even after reading: https://www.openbsd.org/faq/ports/guide.html#Ideal https://man.openbsd.org/bsd.port.mk#FLAVORS_AND_MULTI_PACKAGES So I think I need some help! I'm trying to add a separate minivmac-ii build: How do I specify building a specific package when running make? Running make on its own seems to always build with the -m II option. I attached the diff that I made. Thank you. -- he/him jagtalon.net weirder.earth/@jag Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/minivmac/Makefile,v diff -u -p -u -r1.2 Makefile --- Makefile 24 Jul 2024 01:02:27 -0000 1.2 +++ Makefile 30 Jul 2024 00:01:23 -0000 @@ -1,8 +1,12 @@ ONLY_FOR_ARCHS = i386 amd64 powerpc -COMMENT = early macintosh emulator +MULTI_PACKAGES = -main -ii + +COMMENT-main = Macintosh Plus emulator +COMMENT-ii = Macintosh II emulator + V = 36.04 -REVISION = 0 +REVISION-main = 0 DISTNAME = minivmac-${V} CATEGORIES = emulators @@ -33,16 +37,28 @@ SETUP_FLAGS-amd64 = -t ob64 SETUP_FLAGS-i386 = -t obsd SETUP_FLAGS-powerpc = -t obsd -cpu ppc +.include + +.if ${BUILD_PACKAGES:M-main} +MODEL = -m Plus +BIN = minivmac +.endif + +.if ${BUILD_PACKAGES:M-ii} +MODEL = -m II +BIN = minivmac-ii +.endif + post-extract: cp ${FILESDIR}/SGLUSNIO.h ${WRKSRC}/src do-gen: cd ${WRKSRC}; cc setup/tool.c -o setup_t && \ - ./setup_t ${SETUP_FLAGS-${MACHINE_ARCH}} > gen && \ + ./setup_t ${SETUP_FLAGS-${MACHINE_ARCH}} ${MODEL} > gen && \ sh ./gen do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/minivmac ${PREFIX}/bin/minivmac + ${INSTALL_SCRIPT} ${WRKSRC}/minivmac ${PREFIX}/bin/${BIN} post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/ @@ -50,7 +66,7 @@ post-install: ${PREFIX}/share/pixmaps/ ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/ - ${INSTALL_DATA} ${FILESDIR}/minivmac.desktop \ - ${PREFIX}/share/applications/ + ${INSTALL_DATA} ${FILESDIR}/${BIN}.desktop \ + ${PREFIX}/share/applications/${BIN}.desktop .include Index: files/minivmac-ii.desktop =================================================================== RCS file: files/minivmac-ii.desktop diff -N files/minivmac-ii.desktop --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/minivmac-ii.desktop 30 Jul 2024 00:01:23 -0000 @@ -0,0 +1,9 @@ +[Desktop Entry] +GenericName=Macintosh Emulator +Name=Mini vMac +Comment=Macintosh II emulator +Exec=minivmac +Terminal=false +Type=Application +Categories=Emulator;Graphics; +Icon=minivmac Index: files/minivmac.desktop =================================================================== RCS file: /cvs/ports/emulators/minivmac/files/minivmac.desktop,v diff -u -p -u -r1.1.1.1 minivmac.desktop --- files/minivmac.desktop 18 Jul 2024 01:58:15 -0000 1.1.1.1 +++ files/minivmac.desktop 30 Jul 2024 00:01:23 -0000 @@ -1,7 +1,7 @@ [Desktop Entry] GenericName=Macintosh Emulator Name=Mini vMac -Comment=Early Macintosh emulator +Comment=Macintosh Plus emulator Exec=minivmac Terminal=false Type=Application Index: pkg/DESCR-ii =================================================================== RCS file: pkg/DESCR-ii diff -N pkg/DESCR-ii --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-ii 30 Jul 2024 00:01:23 -0000 @@ -0,0 +1 @@ +Macintosh II emulator. Index: pkg/DESCR-main =================================================================== RCS file: pkg/DESCR-main diff -N pkg/DESCR-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-main 30 Jul 2024 00:01:23 -0000 @@ -0,0 +1 @@ +Macintosh Plus emulator. Index: pkg/PLIST-ii =================================================================== RCS file: pkg/PLIST-ii diff -N pkg/PLIST-ii Index: pkg/PLIST-main =================================================================== RCS file: pkg/PLIST-main diff -N pkg/PLIST-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-main 30 Jul 2024 00:01:23 -0000 @@ -0,0 +1,5 @@ +@bin bin/minivmac +share/applications/minivmac.desktop +share/pixmaps/ +share/pixmaps/minivmac.png +@tag update-desktop-database