On 09/07/18 14:22, David CARLIER wrote:
Thanks ... here a newer version.
Can you please stop sending diffs that you clearly haven't tested? It's
a waste of time. You're clearly just guessing at these updates which you
would immediately know if you bothered to try to actually build the
stuff. `make port-lib-depends-check' unsurprisingly resynched the PLIST
when I ran it, and you still have something in FILESDIR that we're not
installing any more so it has to go.
Attached is a real diff that actually works and that I actually tested.
It would have taken you, what, 10 minutes to do the work instead of
subjecting someone (me and solene@, in this case) to having to do more
work to figure out what you missed, now what, 3 or 4 different diffs
you've sent, all broken? I'm going to start sending all your emails to
/dev/null, because this is not the first time you've done this.
~Brian
On Fri, 7 Sep 2018 at 18:01, Brian Callahan <bcal...@devio.us> wrote:
On 09/07/18 11:37, Solene Rapenne wrote:
David CARLIER <devne...@gmail.com> wrote:
Here attached a slightly different version of the port after Solene
had kindly tested on her side, helped me to pinpoint the cause.
If @thfr and/or @bcallah could give a try, would be great and would
push upstream the fix if confirmed.
Thanks.
The patch on Makefile fails
|Index: Makefile
|===================================================================
|RCS file: /cvs/ports/games/barony/Makefile,v
|retrieving revision 1.2
|diff -u -p -r1.2 Makefile
|--- Makefile 5 May 2018 08:23:17 -0000 1.2
|+++ Makefile 3 Sep 2018 21:58:31 -0000
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 1 with fuzz 1.
Hunk #2 failed at 8.
Hunk #3 succeeded at 40.
1 out of 3 hunks failed
Additionally, this is missing some LDEPS, at least one on PhysFS.
CMake Error at
/usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137
(message):
Could NOT find PhysFS (missing: PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378
(_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindPhysFS.cmake:47 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:150 (find_package)
-- Configuring incomplete, errors occurred!
~Brian
? barony-321.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/barony/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 4 Sep 2018 12:46:12 -0000 1.3
+++ Makefile 7 Sep 2018 19:47:53 -0000
@@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.3 2018/09/04 12:46:12 espie Exp $
-V = 3.1.4
+V = 3.2.1
COMMENT = 3D, first person roguelike
PKGNAME = ${DISTNAME:L}
CATEGORIES = games x11
@@ -8,7 +8,6 @@ CATEGORIES = games x11
GH_ACCOUNT = TurningWheel
GH_PROJECT = Barony
GH_TAGNAME = v${V}
-REVISION = 2
HOMEPAGE = http://www.baronygame.com/
MAINTAINER = David Carlier <devne...@gmail.com>
@@ -17,7 +16,7 @@ MAINTAINER = David Carlier <devnexen@gma
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += ${COMPILER_LIBCXX} GL GLU SDL2 SDL2_image SDL2_net
-WANTLIB += SDL2_ttf c execinfo m ogg openal png vorbisfile
+WANTLIB += SDL2_ttf c execinfo m ogg openal physfs png vorbisfile
# C++11
COMPILER = base-clang ports-gcc
@@ -27,6 +26,7 @@ MODULES = devel/cmake
LIB_DEPENDS = audio/libvorbis \
audio/openal \
devel/libexecinfo \
+ devel/physfs \
devel/sdl2 \
devel/sdl2-image \
devel/sdl2-net \
@@ -41,8 +41,5 @@ CONFIGURE_ARGS = -DCMAKE_C_FLAGS="${CFLA
-DCMAKE_INSTALL_BINDIR="${LOCALBASE}/bin"
NO_TEST = Yes
-
-post-install:
- ${SUBST_CMD} -m 555 -c ${FILESDIR}/barony.sh ${PREFIX}/bin/barony
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/barony/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 4 May 2018 22:30:08 -0000 1.1.1.1
+++ distinfo 7 Sep 2018 19:47:53 -0000
@@ -1,2 +1,2 @@
-SHA256 (Barony-3.1.4.tar.gz) = vPdSJjai3CH92kcRT42cDux4yixBYT6JYxDmEQ+/BMQ=
-SIZE (Barony-3.1.4.tar.gz) = 53299453
+SHA256 (Barony-3.2.1.tar.gz) = 2xK5Imxsg5qddjbHDRrWWgP3i0xCo7icmrbdazAiExo=
+SIZE (Barony-3.2.1.tar.gz) = 53413992
Index: files/barony.sh
===================================================================
RCS file: files/barony.sh
diff -N files/barony.sh
--- files/barony.sh 5 May 2018 08:23:17 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-mkdir -p ~/.barony
-cd ~/.barony || { echo "Can't cd into ~/.barony" >&2; exit 1; }
-exec ${TRUEPREFIX}/bin/barony-bin $@
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/games/barony/patches/patch-CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 4 May 2018 22:30:08 -0000 1.1.1.1
+++ patches/patch-CMakeLists_txt 7 Sep 2018 19:47:53 -0000
@@ -1,111 +1,29 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2018/05/04 22:30:08 solene Exp $
Remove hardcoded -O3
-Rename binary to barony-bin because we are invoking the
-game via a wrapper script, which is named barony.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -58,14 +58,14 @@ if( NOT WIN32 )
+@@ -58,14 +58,13 @@ if( NOT WIN32 )
if(PANDORA)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall ")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
-+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
-+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
++ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g -fuse-ld=gold -fuse-linker-plugin -fsingle-precision-constant")
else()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pg -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover -Wreturn-type -Werror=return-type")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pg")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -funroll-loops -fstrict-aliasing")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
-+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing")
-+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ")
++ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -funroll-loops -fstrict-aliasing")
endif()
if (APPLE)
set (Apple 1)
-@@ -253,7 +253,7 @@ message("${CMAKE_CXX_FLAGS_DEBUG}")
- message("Release flags: ")
- message("${CMAKE_C_FLAGS_RELEASE}")
- message("${CMAKE_CXX_FLAGS_RELEASE}")
--#-O3 -DNDEBUG -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing
-+# -DNDEBUG -Wall -pg -ffast-math -funroll-loops -fstrict-aliasing
- message("***************************")
-
-
-@@ -290,7 +290,7 @@ SET_SOURCE_FILES_PROPERTIES(${MACOSX_BUNDLE_ICON_FILE}
- set_source_files_properties(${GAME_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++")
- #set_source_files_properties(${GAME_SOURCES} PROPERTIES COMPILE_FLAGS "-stdlib=libc++")
- else()
--add_executable(barony ${GAME_SOURCES})
-+add_executable(barony-bin ${GAME_SOURCES})
- endif()
-
- if(WIN32)
-@@ -307,9 +307,9 @@ if(WIN32)
- else()
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
- # 64 bit
-- target_link_libraries(barony -L/usr/lib64 -lstdc++)
-+ target_link_libraries(barony-bin -L/usr/lib64 -lstdc++)
- endif()
-- target_link_libraries(barony ${SDL2_LIBRARIES} ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY})
-+ target_link_libraries(barony-bin ${SDL2_LIBRARIES} ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY})
- if (STEAMWORKS_ENABLED)
- target_link_libraries(barony ${STEAMWORKS_LIBRARY})
- #target_link_libraries(barony ${STEAMWORKS_CWRAPPER_LIBRARIES} -lstdc++)
-@@ -322,15 +322,15 @@ else()
- find_path(EXECINFO_INC NAMES execinfo.h)
- find_library(EXECINFO_LIB NAMES execinfo)
- include_directories(${EXECINFO_INC})
-- target_link_libraries(barony ${EXECINFO_LIB})
-+ target_link_libraries(barony-bin ${EXECINFO_LIB})
- endif()
- endif()
--target_link_libraries(barony ${OPENGL_LIBRARIES})
--target_link_libraries(barony ${THREADS_LIBRARIES})
--target_link_libraries(barony -lm)
-+target_link_libraries(barony-bin ${OPENGL_LIBRARIES})
-+target_link_libraries(barony-bin ${THREADS_LIBRARIES})
-+target_link_libraries(barony-bin -lm)
- if( NOT WIN32 AND NOT APPLE)
- #Remember, Windows and Mac aren't using find_package for FMOD and PNG.
-- target_link_libraries(barony ${PNG_LIBRARY})
-+ target_link_libraries(barony-bin ${PNG_LIBRARY})
- if (FMOD_FOUND)
- target_link_libraries(barony ${FMOD_LIBRARY})
- endif()
-@@ -345,14 +345,14 @@ if(APPLE)
- target_link_libraries(barony -lfmodex) #Finally manually link fmod for mac.
- endif()
- endif()
--target_link_libraries(barony ${EXTRA_LIBS}) #Apple needs this for OpenGL to work.
-+target_link_libraries(barony-bin ${EXTRA_LIBS}) #Apple needs this for OpenGL to work.
-
- if (OPENAL)
-- target_link_libraries(barony ${OPENAL_LIBRARY})
-+ target_link_libraries(barony-bin ${OPENAL_LIBRARY})
- if(TREMOR_ENABLED)
-- target_link_libraries(barony ${TREMOR_LIBRARY})
-+ target_link_libraries(barony-bin ${TREMOR_LIBRARY})
- else()
-- target_link_libraries(barony ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
-+ target_link_libraries(barony-bin ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
- endif()
- endif()
-
-@@ -365,7 +365,7 @@ if (NOT APPLE AND UNIX)
- endif()
- message(STATUS "Base data directory ${BASE_DATA_DIR}")
-
-- install(TARGETS barony
-+ install(TARGETS barony-bin
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- COMPONENT Runtime
- )
-@@ -445,7 +445,7 @@ if (NOT APPLE AND UNIX)
+@@ -457,7 +456,7 @@ if (NOT APPLE AND UNIX)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
)
Index: patches/patch-src_menu_cpp
===================================================================
RCS file: patches/patch-src_menu_cpp
diff -N patches/patch-src_menu_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_menu_cpp 7 Sep 2018 19:47:53 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/menu.cpp
+--- src/menu.cpp.orig
++++ src/menu.cpp
+@@ -12266,7 +12266,7 @@ bool gamemodsClearAllMountedPaths()
+ for ( i = PHYSFS_getSearchPath(); *i != NULL; i++ )
+ {
+ std::string line = *i;
+- if ( line.compare(outputdir) != 0 && line.compare("./") != 0 ) // don't unmount the base ./ directory
++ if ( line.compare(outputdir) != 0 && line.compare(datadir) != 0 && line.compare("./") != 0 ) // don't unmount the base ./ directory
+ {
+ if ( PHYSFS_unmount(*i) == 0 )
+ {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/barony/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 4 Sep 2018 12:46:12 -0000 1.2
+++ pkg/PLIST 7 Sep 2018 19:47:53 -0000
@@ -1,6 +1,5 @@
@comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:46:12 espie Exp $
-bin/barony
-@bin bin/barony-bin
+@bin bin/barony
@bin bin/barony-editor
share/barony/
share/barony/lang/