Closed clanmills closed 5 years ago
Here's the patch:
localhost$ git status
On branch 0.27-maintenance
Your branch is up to date with 'origin/0.27-maintenance'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ../cmake/config.h.cmake
modified: ../test/functions.source
no changes added to commit (use "git add" and/or "git commit -a")
localhost$ git diff
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index b3290633..b5652cc8 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -35,7 +35,7 @@
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
#cmakedefine ICONV_ACCEPTS_CONST_INPUT
-#if defined ICONV_ACCEPTS_CONST_INPUT
+#if defined(ICONV_ACCEPTS_CONST_INPUT) || defined(__NetBSD__)
#define EXV_ICONV_CONST const
#else
#define EXV_ICONV_CONST
diff --git a/test/functions.source b/test/functions.source
index a8cfe22b..0c5d2189 100644
--- a/test/functions.source
+++ b/test/functions.source
@@ -421,7 +421,11 @@ checkSum()
{
# cygwin checksum: http://esrg.sourceforge.net/utils_win_up/md5sum/
# macosx - built/installed coreutils 8.25 http://ftp.gnu.org/gnu/coreutils/
- md5sum $1 | cut -d' ' -f 1
+ if [ $(uname) == 'NetBSD' ]; then
+ md5 -q $1
+ else
+ md5sum $1 | cut -d' ' -f 1
+ fi
}
##
localhost$
localhost$
localhost$ uname -a
NetBSD localhost 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
localhost$ git status
On branch 0.27-maintenance
Your branch is up to date with 'origin/0.27-maintenance'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ../cmake/config.h.cmake
modified: ../test/functions.source
no changes added to commit (use "git add" and/or "git commit -a")
localhost$ git diff
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index b3290633..b5652cc8 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -35,7 +35,7 @@
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
#cmakedefine ICONV_ACCEPTS_CONST_INPUT
-#if defined ICONV_ACCEPTS_CONST_INPUT
+#if defined(ICONV_ACCEPTS_CONST_INPUT) || defined(__NetBSD__)
#define EXV_ICONV_CONST const
#else
#define EXV_ICONV_CONST
diff --git a/test/functions.source b/test/functions.source
index a8cfe22b..0c5d2189 100644
--- a/test/functions.source
+++ b/test/functions.source
@@ -421,7 +421,11 @@ checkSum()
{
# cygwin checksum: http://esrg.sourceforge.net/utils_win_up/md5sum/
# macosx - built/installed coreutils 8.25 http://ftp.gnu.org/gnu/coreutils/
- md5sum $1 | cut -d' ' -f 1
+ if [ $(uname) == 'NetBSD' ]; then
+ md5 -q $1
+ else
+ md5sum $1 | cut -d' ' -f 1
+ fi
}
##
localhost$
I'll submit this as a PR to 0.27-maintenance this evening.
build/install google test to run the unit tests:
$ su root
# cd /usr/pkgsrc/devel/googletest
# make install
# exit
Build unit tests:
$ cd <exiv2dir>/build
$ cmake .. -DEXIV2_BUILD_UNIT_TESTS=On
$ make
$ bin/unit_tests
.....
[ FAILED ] 3 tests, listed below:
[ FAILED ] strError.returnSuccessAfterClosingFile
[ FAILED ] strError.doNotRecognizeUnknownError
[ FAILED ] getProcessPath.obtainPathOfUnitTestsExecutable
Something wrong in obtaining the executable path. I'll investigate later.
Thanks for taking a look at this @clanmills. It would be nice to have a CI for this, but unfortunately there's literally no one offering NetBSD (FreeBSD is offered on sourcehut, which I plan on adding at some point).
No problem. We can use Jenkins on the MacMini. @nehaljwani and I will work on that, right Nehal?
Progress update.
The patch above is "basically valid". However there are several consequential issues to be considered. For example: 1) Make NetBSD a "supported build" and generate build bundles for release.
$ exiv2 --verbose --version
to report:std::string Exiv2::getProcessPath()
for NetBSD
4) Verify that localisation is working correctly.There's probably something I have not yet discovered (or forgotten, or overlooked).
I hope to complete the work in the next few days and submit a PR.
@clanmills can we close this ticket once #833 was merged ?
Yes. It's closed. I've update the Jenkins scripts (in SVN) to build on those platforms.
This is derived from a discussion about #818