summaryrefslogtreecommitdiff
path: root/textproc/OdfConverter/Makefile
blob: 9ee3b03ee1a77ca120bc57397a980b65c70edc71 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# $NetBSD: Makefile,v 1.35 2014/05/05 00:48:23 ryoon Exp $
#

DISTNAME=	OdfAddinForOffice-src-3.0
PKGNAME=	OdfConverter-3.0
PKGREVISION=	27
CATEGORIES=	converters textproc
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=odf-converter/}
EXTRACT_SUFX=	.zip

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://odf-converter.sourceforge.net/
COMMENT=	Converter between Microsoft Office 2007 and OpenOffice formats
LICENSE=	modified-bsd

# mono-basic DLLs are required at run-time (but not at build time).
DEPENDS+=	mono-basic-[0-9]*:../../lang/mono-basic

USE_LANGUAGES=	c
USE_TOOLS+=	gmake pkg-config

BUILD_DIRS=	source/Common/OdfZipUtils
BUILD_DIRS+=	source/Common/OdfConverterLib
BUILD_DIRS+=	source/Word/Converter
BUILD_DIRS+=	source/Presentation/Converter
BUILD_DIRS+=	source/Spreadsheet/Converter
BUILD_DIRS+=	source/AdditionalTools/zlib123/contrib/minizip
BUILD_DIRS+=	source/Shell/OdfConverter

MAKE_JOBS_SAFE=	no

INSTALLATION_DIRS=	bin share/doc/OdfConverter

#
# The Subversion repository has a number of file name case issues.  The
# essential ones are fixed here so that the build can complete on a
# case-sensitive filesystem.
#
FILE_CASE_FIXES=	${BUILD_DIRS}
FILE_CASE_FIXES+=	source/Shell/OdfConverter/OdfCommandLineException.cs
FILE_CASE_FIXES+=	source/Shell/OdfConverter/OdfConverter.cs
FILE_CASE_FIXES+=	source/Shell/OdfConverter/OoxValidator.cs
FILE_CASE_FIXES+=	source/Shell/OdfConverter/OdfValidator.cs
post-extract:
	cd ${WRKDIR} && mv "odf-converter-r5224/trunk" ${DISTNAME:Q}
	set -e; \
	find "${WRKSRC}" -name Makefile -o \
	    -name '[Mm][Aa][Kk][Ee][Ff][Ii][Ll][Ee]' -print | \
	  while read file; do \
	    dir=`dirname "$$file"`; mv "$$file" "$$dir/Makefile"; done
	set -e; files=""; \
	for file in ${FILE_CASE_FIXES}; do \
	  while [ -n "$$file" -a "$$file" != "." ]; do \
	    files="$$file $$files"; base=`basename "$$file"`; \
	    file=`dirname "$$file"`; \
	  done; \
	done; \
	for file in $$files; do \
	  base=`basename "$$file"`; subdir=`dirname "$$file"`; \
	  lcbase=`basename "$$file" | tr 'A-Z' 'a-z'`; \
	  subdir="${WRKSRC}/$$subdir"; \
	  if [ -e "$$subdir/$$lcbase" -a ! -e "$$subdir/$$base" ]; then \
	    mv "$$subdir/$$lcbase" "$$subdir/$$base"; \
	  fi; \
	done

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/source/Shell/OdfConverter/OdfConverter \
		${DESTDIR}${PREFIX}/bin/
	${INSTALL_DATA} ${WRKSRC}/source/Shell/OdfConverter/README.TXT \
		${DESTDIR}${PREFIX}/share/doc/OdfConverter/README.TXT

.include "../../lang/mono2/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"