1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/www/opera/Makefile
Tobias C. Berner 0f583d8700 Replace Mk/bsd.kde4.mk by Mk/Uses/kde.mk in preparation for KDE Frameworks and
Plasma5 ports

At the moment KDE ports use bsd.kde4.mk to handle their dependencies. When
working on the ports for KDE Frameworks and Plasma5 it seemed to be more
reasonable to create a new kde.mk instead of adding an bsd.kde5.mk.

The kde.mk in this review is a stripped down version of the one we are using in
the KDE Test repositories plasma5 branch [1] to only contain the parts relevant
to the current KDE4 ports in the portstree [2].

Changes to the KDE Ports needed by this:

Replace USE_KDE4 by USE_KDE [3]
Add USES=kde:4 [4]
[1] http://src.mouf.net/area51/view/branches/plasma5/KDE/Mk/Uses/kde.mk
[2] The version in the plasma5 branch also handles frameworks/plasma5 and
    handles MASTER_SITES via a KDE_DIST variable similar to bsd.qt.mk for Qt
    Ports -- I chose to leave this out for now, as the diff is already large
    enough.
[3] I chose USE_KDE instead of USE_KDE4, USE_KDE5, USE_KDEX as the version we
    want is already specified as argument to kde:<arg>
[4] For KDE Frameworks and Plasma5 ports this would be kde:5

PR:             210667
Approved by:    portmgr, mat (mentor), rakuco (mentor)
Reviewed by:    mat, rakuco
Differential Revision:   https://reviews.freebsd.org/D6961
2016-08-24 08:20:31 +00:00

111 lines
3.3 KiB
Makefile

# $FreeBSD$
PORTNAME= opera
PORTVERSION= ${OPERA_VER}
PORTREVISION= 6
CATEGORIES= www ipv6
MASTER_SITES= ftp://ftp.opera.com/pub/opera/${MASTER_SITES_VER_PATH}/ \
ftp://opera.inode.at/${MASTER_SITES_VER_PATH}/ \
http://gd.tuwien.ac.at/infosys/browsers/opera/${MASTER_SITES_VER_PATH}/ \
ftp://opera.ftp.fu-berlin.de/${MASTER_SITES_VER_PATH}/ \
http://ftp.ntua.gr/pub/www/Opera/${MASTER_SITES_VER_PATH}/ \
http://mirrors.dedipower.com/opera/${MASTER_SITES_VER_PATH}/ \
ftp://ftp.tiscali.nl/pub/mirrors/opera/${MASTER_SITES_VER_PATH}/
DISTNAME= ${PORTNAME}-${OPERA_VER}-${OPERA_BUILD}.${ARCH}.freebsd
MAINTAINER= ak@FreeBSD.org
COMMENT= Blazingly fast, full-featured, standards-compliant browser
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig
BUILD_DEPENDS= ${LOCALBASE}/bin/update-mime-database:misc/shared-mime-info
RUN_DEPENDS= ${LOCALBASE}/bin/update-mime-database:misc/shared-mime-info
BUNDLE_LIBS= yes
ONLY_FOR_ARCHS= i386 amd64
OPERA_VER?= 12.16
OPERA_BUILD?= 1860
MASTER_SITES_VER_PATH= unix/${OPERA_VER:S/.//}
USES= tar:xz desktop-file-utils shared-mime-info
USE_XORG= x11 xext sm ice xft xrender
REINPLACE_ARGS= -i '' # no .bak files
WEBPLUGIN_SUBDIR= ${LOCALBASE}/lib/browser_plugins/symlinks/opera
OPTIONS_DEFINE= CUPS VIDEO GTK2 KDE4
OPTIONS_DEFAULT= CUPS VIDEO
NO_OPTIONS_SORT=yes
CUPS_DESC= support for printing (requires CUPS)
VIDEO_DESC= support for HTML5 video (requires GStreamer)
CUPS_LIB_DEPENDS= libcups.so:print/cups
VIDEO_USE= gstreamer=vorbis,ogg,theora,vp8,good
GTK2_USE= gnome=gtk20,libxml2
KDE4_USES= kde:4
KDE4_USE= KDE=kdelibs
.include <bsd.port.options.mk>
.if defined(FETCH_ALL)
# distfiles for both arch
.if ${ARCH} == i386
DISTFILES= ${PORTNAME}-${OPERA_VER}-${OPERA_BUILD}.amd64.freebsd${EXTRACT_SUFX} \
${DISTNAME}${EXTRACT_SUFX}
.else
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${PORTNAME}-${OPERA_VER}-${OPERA_BUILD}.i386.freebsd${EXTRACT_SUFX}
.endif
.endif
.if ${PORT_OPTIONS:MGTK2}
INSTALLS_ICONS= yes
.endif
OPERA_ARCH= ${ARCH:S,i386,intel,}
.if ${OSVERSION} >= 1000054
BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libstdc++.so.6:misc/compat9x
PLIST_SUB+= LIBSTDC=""
.else
PLIST_SUB+= LIBSTDC="@comment "
.endif
post-extract:
${GUNZIP_CMD} ${WRKSRC}/share/man/man1/opera.1.gz
do-build:
.if ${OSVERSION} >= 1000054
${CP} ${LOCALBASE}/lib/compat/libstdc++.so.6 ${WRKSRC}
.endif
do-configure:
@${MV} ${WRKSRC}/share/man ${WRKSRC}/man
@${REINPLACE_CMD} -e 's|"$${0%/.}"|${PREFIX}|g' \
-e 's|/usr/local/profile|$$HOME/.opera|' \
${WRKSRC}/opera
@${REINPLACE_CMD} -e 's|@@{PREFIX}|${PREFIX}|g' \
-e 's|@@{_SUFFIX}||g' -e 's|@@{SUFFIX}||g' \
-e 's|@@{USUFFIX}||g' \
${WRKSRC}/share/applications/opera-browser.desktop \
${WRKSRC}/share/mime/packages/opera-extension.xml \
${WRKSRC}/man/man1/opera.1
@${REINPLACE_CMD} -e 's|/usr/X11R6/lib/browser_plugins|${WEBPLUGIN_SUBDIR}|g' \
${WRKSRC}/share/opera/defaults/pluginpath.ini
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/opera ${STAGEDIR}${PREFIX}/bin/
${TAR} -C ${WRKSRC} -cf - lib man share | ${TAR} -C ${STAGEDIR}${PREFIX} -xf -
.if ${OSVERSION} >= 1000054
${INSTALL_LIB} ${WRKSRC}/libstdc++.so.6 ${STAGEDIR}${PREFIX}/lib/opera
.endif
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d
${INSTALL_DATA} ${FILESDIR}/libmap.conf \
${STAGEDIR}${PREFIX}/etc/libmap.d/opera.conf
.include <bsd.port.mk>