aboutsummaryrefslogtreecommitdiff
path: root/website/content/en/gnome/docs/example-makefile.adoc
blob: f6117ac07e8c049ac27adb9cbef6986b61a8d5b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: "FreeBSD GNOME Project: Example GNOME Makefile"
sidenav: gnome
--- 

= FreeBSD GNOME Project: Example GNOME Makefile

The following is an example Makefile for a FreeBSD GNOME port.

....
# New ports collection makefile for:	gnomeapp
# Date created:    27 December 2003
# Whom:    Some GNOME User <freebsd-gnome@FreeBSD.org>
#
# $FreeBSD: head/en_US.ISO8859-1/htdocs/gnome/docs/example-Makefile.xml 43181 2013-11-13 06:10:37Z hrs $
#

# For this example, assume there was already a gnomeapp in the tree, and that this
# is the GTK+-2 version (i.e. gnomeapp2 versus gnomeapp).
PORTname= gnomeapp2
PORTVERSION= 2.32.2
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2//}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
DISTname= ${PORTNAME:S/2//}-${PORTVERSION}
DIST_SUBDIR= gnome2

MAINTAINER= gnome@FreeBSD.org
COMMENT= A GNOME app that does some stuff

USE_BZIP2= yes
GNU_CONFIGURE= yes # NOTE: if the port needs ltverhack, this must be
USE_AUTOTOOLS="libtool":15
USE_GMAKE= yes # same with GNU make
# This is for i18n:
CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include" \
    LDFLAGS="-L${LOCALBASE}/lib"
USE_GNOME= gnomehack gtk20

# This application can dock in the GNOME panel, or it can not.
# But there's no need to build support for it if the GNOME panel
# libraries are not installed, so only build GNOME panel support
# if the gnomepanel port is already installed.
WANT_GNOME= yes

.include <bsd.port.pre.mk>

.if ${HAVE_GNOME:Mgnomepanel}!=""
USE_GNOME+= gnomepanel
CONFIGURE_ARGS+= --with-gnome
PKGNAMESUFFIX= -gnome
.else
CONFIGURE_ARGS+= --without-gnome
.endif

# Given all the above code, the package name is either "gnomeapp2-gnome-2.32.2" or
# "gnomeapp2-2.32.2", depending upon whether you want gnomepanel support. The downloaded
# distfile will be "gnomeapp-2.32.2.tar.bz2."

.include <bsd.port.post.mk>
....