From owner-svn-ports-head@freebsd.org Mon Oct 15 20:28:10 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1CE710C835F; Mon, 15 Oct 2018 20:28:09 +0000 (UTC) (envelope-from thierry@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 979C683B83; Mon, 15 Oct 2018 20:28:09 +0000 (UTC) (envelope-from thierry@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 920D8121A9; Mon, 15 Oct 2018 20:28:09 +0000 (UTC) (envelope-from thierry@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9FKS9uN075372; Mon, 15 Oct 2018 20:28:09 GMT (envelope-from thierry@FreeBSD.org) Received: (from thierry@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9FKS9tS075352; Mon, 15 Oct 2018 20:28:09 GMT (envelope-from thierry@FreeBSD.org) Message-Id: <201810152028.w9FKS9tS075352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thierry set sender to thierry@FreeBSD.org using -f From: Thierry Thomas Date: Mon, 15 Oct 2018 20:28:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482166 - in head/deskutils/pinot: . files X-SVN-Group: ports-head X-SVN-Commit-Author: thierry X-SVN-Commit-Paths: in head/deskutils/pinot: . files X-SVN-Commit-Revision: 482166 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2018 20:28:10 -0000 Author: thierry Date: Mon Oct 15 20:28:08 2018 New Revision: 482166 URL: https://svnweb.freebsd.org/changeset/ports/482166 Log: - Fix OpenSSL build (1) - Enable libnotify PR: 232234 Submitted by: Nathan (1) Added: head/deskutils/pinot/files/patch-openssl (contents, props changed) Modified: head/deskutils/pinot/Makefile Modified: head/deskutils/pinot/Makefile ============================================================================== --- head/deskutils/pinot/Makefile Mon Oct 15 17:35:43 2018 (r482165) +++ head/deskutils/pinot/Makefile Mon Oct 15 20:28:08 2018 (r482166) @@ -3,7 +3,7 @@ PORTNAME= pinot PORTVERSION= 1.09 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= deskutils MAINTAINER= thierry@FreeBSD.org @@ -21,6 +21,7 @@ LIB_DEPENDS= libxapian.so:databases/xapian-core \ libdbus-1.so:devel/dbus \ libxml++-2.6.so:textproc/libxml++26 \ libboost_thread.so:devel/boost-libs \ + libnotify.so:devel/libnotify \ libexif.so:graphics/libexif \ libexiv2.so:graphics/exiv2 \ libgmime-2.4.so:mail/gmime24 \ @@ -39,20 +40,20 @@ USE_GITHUB= yes GH_ACCOUNT= FabriceColin GH_TAGNAME= c14d6d5 -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-http=curl --with-ssl=${OPENSSLBASE} --enable-libarchive \ - --enable-mempool=no -CONFIGURE_ENV= MKDIR_P="${MKDIR}" TEXTCAT_LIBS="-lexttextcat-2.0" -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib -lboost_system - -USES= compiler:c++11-lang autoreconf gettext libarchive \ +USES= compiler:c++11-lang autoreconf gettext gnome libarchive \ libtool pkgconfig python shebangfix sqlite:3 ssl USE_CXXSTD= c++11 USE_XORG= pixman USE_GNOME= atkmm cairo cairomm glibmm gtk20 gtkmm24 libsigc++20 libxml2 pangomm USE_LDCONFIG= ${PREFIX}/lib/pinot/backends ${PREFIX}/lib/pinot/filters SHEBANG_FILES= scripts/bash/*.sh + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-http=curl --with-ssl=${OPENSSLBASE} --enable-libarchive \ + --enable-mempool=no --enable-libnotify +CONFIGURE_ENV= MKDIR_P="${MKDIR}" TEXTCAT_LIBS="-lexttextcat-2.0" +CPPFLAGS+= -I${LOCALBASE}/include +LIBS+= -L${LOCALBASE}/lib -lboost_system OPTIONS_DEFINE= DEBUG CHMLIB DOCS OPTIONS_SUB= yes Added: head/deskutils/pinot/files/patch-openssl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/deskutils/pinot/files/patch-openssl Mon Oct 15 20:28:08 2018 (r482166) @@ -0,0 +1,102 @@ +Description: Catch up with current glib and OpenSSL +Author: FabriceColin +Bug-Debian: https://bugs.debian.org/828503 +Forwarded: yes +Last-Update: 2018-06-14 + +diff --git Collect/DownloaderInterface.cpp Collect/DownloaderInterface.cpp +index 10f4f66..f084f50 100644 +--- Collect/DownloaderInterface.cpp ++++ Collect/DownloaderInterface.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005-2008 Fabrice Colin ++ * Copyright 2005-2017 Fabrice Colin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -33,7 +33,8 @@ using namespace std; + + #ifdef USE_SSL + // OpenSSL multi-thread support, required by Curl +-static pthread_mutex_t locksTable[CRYPTO_NUM_LOCKS]; ++static unsigned int g_lockArrayCount = 0; ++static pthread_mutex_t *g_pLockArray = NULL; + + // OpenSSL locking functiom + static void lockingCallback(int mode, int n, const char *file, int line) +@@ -42,7 +43,7 @@ static void lockingCallback(int mode, int n, const char *file, int line) + + if (mode & CRYPTO_LOCK) + { +- status = pthread_mutex_lock(&(locksTable[n])); ++ status = pthread_mutex_lock(&(g_pLockArray[n])); + #ifdef DEBUG + if (status != 0) + { +@@ -52,7 +53,7 @@ static void lockingCallback(int mode, int n, const char *file, int line) + } + else + { +- status = pthread_mutex_unlock(&(locksTable[n])); ++ status = pthread_mutex_unlock(&(g_pLockArray[n])); + #ifdef DEBUG + if (status != 0) + { +@@ -82,9 +83,15 @@ void DownloaderInterface::initialize(void) + pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); + + // Initialize the OpenSSL mutexes +- for (unsigned int lockNum = 0; lockNum < CRYPTO_NUM_LOCKS; ++lockNum) ++#ifdef CRYPTO_num_locks ++ g_lockArrayCount = CRYPTO_num_locks(); ++#else ++ g_lockArrayCount = CRYPTO_NUM_LOCKS; ++#endif ++ g_pLockArray = (pthread_mutex_t *)OPENSSL_malloc(g_lockArrayCount * sizeof(pthread_mutex_t)); ++ for (unsigned int lockNum = 0; lockNum < g_lockArrayCount; ++lockNum) + { +- pthread_mutex_init(&(locksTable[lockNum]), &mutexAttr); ++ pthread_mutex_init(&(g_pLockArray[lockNum]), &mutexAttr); + } + // Set the callbacks + CRYPTO_set_locking_callback(lockingCallback); +@@ -103,10 +110,13 @@ void DownloaderInterface::shutdown(void) + CRYPTO_set_locking_callback(NULL); + + // Free the mutexes +- for (unsigned int lockNum = 0; lockNum < CRYPTO_NUM_LOCKS; ++lockNum) ++ for (unsigned int lockNum = 0; lockNum < g_lockArrayCount; ++lockNum) + { +- pthread_mutex_destroy(&(locksTable[lockNum])); ++ pthread_mutex_destroy(&(g_pLockArray[lockNum])); + } ++ OPENSSL_free(g_pLockArray); ++ g_pLockArray = NULL; ++ g_lockArrayCount = 0; + #endif + } + +diff --git Utils/MIMEScanner.cpp Utils/MIMEScanner.cpp +index e02215c..50ceb3d 100644 +--- Utils/MIMEScanner.cpp ++++ Utils/MIMEScanner.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005-2012 Fabrice Colin ++ * Copyright 2005-2017 Fabrice Colin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -456,9 +456,10 @@ MIMEScanner::~MIMEScanner() + bool MIMEScanner::initialize(const string &userPrefix, const string &systemPrefix) + { + #ifdef USE_GIO ++#if !GLIB_CHECK_VERSION(2,35,0) + // Initialize the GType system + g_type_init(); +- ++#endif + return true; + #else + list desktopFilesPaths;