[yoshimi] Re: a bit late but possible CMakeLists.txt patch

  • From: blubee blubeeme <gurenchan@xxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Thu, 14 Dec 2017 12:02:26 +0800

On Wed, Dec 13, 2017 at 6:29 PM, Nikita Zlobin <dmarc-noreply@xxxxxxxxxxxxx>
wrote:

В Tue, 12 Dec 2017 23:33:33 +0800
blubee blubeeme <gurenchan@xxxxxxxxx> пишет:

On FreeBSD there are a few issues that we wrote a custom patch for.
1) Install man pages in the correct location
2) Fix a bug in the build on FreeBSD 10.3

----------------------------
Here's the svn diff of the CMakeLists.txt
- Fix libz check
  src.c:4:14: error: use of undeclared identifier 'NULL'
         if (NULL != zzz)
             ^
- Install manpages under ${PREFIX}/man and not ${PREFIX}/share/man

--- src/CMakeLists.txt.orig 2017-11-08 12:25:31 UTC
+++ src/CMakeLists.txt
@@ -156,6 +156,7 @@ endif(NOT LIBC_HAS_ARGP)
 set (CMAKE_REQUIRED_LIBRARIES z)
 check_c_source_compiles (
     "#include <zlib.h>
+     #include <stdlib.h>
      int main(int argc, char **argv) {
          gzFile zzz  = gzopen(\"/dev/null\", \"rb\");
          if (NULL != zzz)
@@ -605,7 +606,7 @@ install (FILES
${CMAKE_CURRENT_SOURCE_DIR}/../desktop/ install (FILES
${CMAKE_CURRENT_SOURCE_DIR}/../desktop/metainfo/yoshimi.appdata.xml
     DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
 install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/../desktop/yoshimi.1
-    DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man1)
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1)

 set_directory_properties (PROPERTIES
     ADDITIONAL_MAKE_CLEAN_FILES "${FltkUI_headers}"
----------------------------

Are these changes able to be applied upstream?

As far as i know, gentoo ebuilds handle such cases by moving files to
proper dirs, before merge actually happens. Could not same be done in
bsd ports?
Yoshimi source code is available from either: https://sourceforge.net/
projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx


The patch that I shared does what you say and moves the man files to the
proper location.
One of the biggest issues that I had with Linux distros is the lack of
consistency where things are placed.
I saw a comment that maybe you could provide a make/cmake variable for man
page location.

The issue with compilation, some OS are strict about what they let through
but if you look at GCC or CLANG,
they are all moving towards stricter code standards.

Best

Other related posts: