On 2019/11/06 18:02, Rafael Sadowski wrote:
> On Tue Oct 29, 2019 at 09:37:21AM -0300, Adriano Barbosa wrote:
> > Hi.
> > This is my first try on porting anything, any help is very much
> > appreciated.
> > Test for architectures other than amd64 needed.
> > 
> > Some patches to make it work were needed:
> > - HTTP/Basic auth by removing QtWebEngine, as it's not available. Patch
> >   similar to [1]
> > - Work with LibreSSL [2]
> > 
> > [1]https://github.com/nextcloud/desktop/issues/932#issuecomment-485338640
> > [2]https://github.com/nextcloud/desktop/issues/738#issuecomment-470359183
> > 
> > Best
> > --
> > Adriano Barbosa
> 
> 
> First of all thanks for your work and the port. Please find attached a
> modified version. Here is a list and a diff of things I've chanced:
> 
> - Synced with patches from net/owncloudclient (Stuff like stop searching
>   for updates etc.)
> - Updated to verison 2.6.1
> - Added SHARED_LIBS
> - Removed GH_ vars and use PKGNAME/DISTNAME

Please don't do that for github /archive/ URLs, GH_* are correct for those.
(These are the autogenerated ones).

Where upstream provides an uploaded tarball under /releases/ assets you should
use that instead (e.g. see darktable, zeromq, aqualung, etc) but that isn't
the case for nextcloud/desktop.



> - Drop COMPILER line it comes from x11/qt5
> - Use cmake option and set -DNO_SHIBBOLETH=ON to avoid QtWebkit (I dont
>   wont see this anymore in new ports)
> - Enable tests (ChunkingNgTest stucks)
> - Remove port local GNUInstallDirs.cmake and use from system
> - Install sync-exclude.lst under examples and not under /etc
> 
> I also dropped your LibreSSL patch it's in current (Thanks tb@)
> 
> Tests and OK's are welcome.
> 
> RS
> 
> 
> --- /home/rsadowski/nextcloudclient/Makefile  Tue Oct 29 13:24:05 2019
> +++ Makefile  Wed Nov  6 17:16:55 2019
> @@ -2,45 +2,53 @@
>  
>  COMMENT =    nextcloud sync client
>  
> -V =          2.6.0
> -DISTNAME =   nextcloudclient-${V}
> +V =          2.6.1
> +PKGNAME =    nextcloudclient-${V}
> +DISTNAME =   v${V}
>  
> -GH_ACCOUNT = nextcloud
> -GH_PROJECT = desktop
> -GH_TAGNAME = v${V}
> -
> -SHARED_LIBS +=       nextcloudsync   2.6
> -SHARED_LIBS +=       ocsync          2.6
> -
>  CATEGORIES = net
>  
>  HOMEPAGE =   https://nextcloud.com
>  
> +SHARED_LIBS +=  nextcloudsync                   0.0 # 2.6.1
> +SHARED_LIBS +=  ocsync                          0.0 # 2.6.1
> +
>  MAINTAINER = Adriano Barbosa <[email protected]>
>  
>  # GPLv2+
>  PERMIT_PACKAGE =     Yes
>  
> -WANTLIB +=   Qt5Core Qt5Network Qt5Xml Qt5Concurrent qt5keychain
> -WANTLIB +=   Qt5WebKit Qt5WebKitWidgets Qt5Widgets Qt5DBus
> -WANTLIB +=   lib/inotify/inotify
> +WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
> +WANTLIB += Qt5Network Qt5Widgets Qt5Xml c crypto m qt5keychain
> +WANTLIB += sqlite3 ssl z lib/inotify/inotify
>  
> -MASTER_SITES =       https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/
> -EXTRACT_SUFX =       .tar.gz
> -DISTFILES =  ${GH_TAGNAME}${EXTRACT_SUFX}
> +MASTER_SITES =       https://github.com/nextcloud/desktop/archive/
>  
> -# c++0x
> -COMPILER =   base-clang ports-gcc
> +MODULES =    devel/cmake \
> +             x11/qt5
>  
> -MODULES =    devel/cmake x11/qt5
> +BUILD_DEPENDS =              devel/gettext,-tools
>  
> -RUN_DEPENDS =        devel/desktop-file-utils \
> -             x11/gtk+3,-guic
> +# Needs for test at build-time
> +BUILD_DEPENDS +=     devel/cmocka
>  
> -LIB_DEPENDS =        devel/libinotify \
> -             security/qtkeychain,qt5 \
> -             x11/qt5/qtwebkit
> +RUN_DEPENDS =                devel/desktop-file-utils \
> +                     x11/gtk+3,-guic
>  
> +LIB_DEPENDS =                databases/sqlite3 \
> +                     devel/libinotify \
> +                     security/qtkeychain,qt5
> +
> +CONFIGURE_ARGS =     -DBUILD_SHELL_INTEGRATION_NAUTILUS=OFF \
> +                     -DBUILD_SHELL_INTEGRATION_DOLPHIN=OFF \
> +                     -DBUILD_SHELL_INTEGRATION=OFF \
> +                     -DUNIT_TESTING=ON \
> +                     -DWITH_CRASHREPORTER=OFF \
> +                     -DNO_SHIBBOLETH=ON
> +
> +# Do not install under /etc/Nextcloud
> +CONFIGURE_ARGS +=    
> -DSYSCONF_INSTALL_DIR="${PREFIX}/share/examples/nextcloudclient"
> +
>  CONFIGURE_ARGS +=    -DCMAKE_C_FLAGS="${CFLAGS} \
>                               -I${LOCALBASE}/include/inotify \
>                               -I${LOCALBASE}/include/qtkeychain \
> @@ -53,10 +61,12 @@ CONFIGURE_ARGS += -DCMAKE_C_FLAGS="${CFLAGS} \
>                               -L${LOCALBASE}/lib/inotify \
>                               -L${LOCALBASE}/lib \
>                               -linotify \
> -                             -Wl,-rpath=${LOCALBASE}/lib/inotify" \
> -                     -DCMAKE_DISABLE_FIND_PACKAGE_KF5=TRUE \
> -                     -DCMAKE_DISABLE_FIND_PACKAGE_Qt5LinguistTools=TRUE
> +                             -Wl,-rpath=${LOCALBASE}/lib/inotify"
>  
> -NO_TEST =    Yes
> +WRKDIST =                    ${WRKDIR}/desktop-${V}
> +
> +pre-configure:
> +     # user system-wise cmake modules
> +     rm ${WRKSRC}/cmake/modules/GNUInstallDirs.cmake
>  
>  .include <bsd.port.mk>


Reply via email to