1SUMMARY="A Qt-based markdown text editor"
2DESCRIPTION="CuteMarkEd is a Qt-based markdown editor with live HTML preview, \
3math expressions, code and markdown syntax highlighting."
4HOMEPAGE="https://cloose.github.io/CuteMarkEd"
5COPYRIGHT="2013 Christian Loose
6	2007 David Loren Parsons
7	2011-2012 Ali Rantakari
8	2012 CodeCatalyst, LLC"
9LICENSE="GNU GPL v2
10	MIT"
11REVISION="5"
12SOURCE_URI="https://github.com/cloose/CuteMarkEd/archive/v$portVersion.tar.gz"
13CHECKSUM_SHA256="78a41808c2f0452375810abdff76eeaaee012f8d1368a2b8772ec6b4d2ceeec8"
14SOURCE_DIR="CuteMarkEd-$portVersion"
15PATCHES="cutemarked-$portVersion.patchset"
16ADDITIONAL_FILES="CuteMarkEd.rdef.in"
17
18ARCHITECTURES="all !x86_gcc2 ?x86"
19SECONDARY_ARCHITECTURES="x86"
20
21PROVIDES="
22	cutemarked$secondaryArchSuffix = $portVersion
23	app:CuteMarkEd$secondaryArchSuffix = $portVersion
24	"
25REQUIRES="
26	haiku$secondaryArchSuffix
27	lib:libGL$secondaryArchSuffix
28	lib:libhunspell_1.7$secondaryArchSuffix
29	lib:libmarkdown$secondaryArchSuffix
30	lib:libQt5Core$secondaryArchSuffix
31	lib:libQt5Gui$secondaryArchSuffix
32	lib:libQt5Network$secondaryArchSuffix
33	lib:libQt5PrintSupport$secondaryArchSuffix
34	lib:libQt5Test$secondaryArchSuffix
35	lib:libQt5WebKit$secondaryArchSuffix
36	lib:libQt5WebKitWidgets$secondaryArchSuffix
37	lib:libQt5Widgets$secondaryArchSuffix
38	"
39
40BUILD_REQUIRES="
41	haiku${secondaryArchSuffix}_devel
42	devel:libhunspell_1.7$secondaryArchSuffix
43	devel:libmarkdown$secondaryArchSuffix
44	devel:libQt5Core$secondaryArchSuffix
45	devel:libQt5Gui$secondaryArchSuffix
46	devel:libQt5Network$secondaryArchSuffix
47	devel:libQt5PrintSupport$secondaryArchSuffix
48	devel:libQt5QmlDebug$secondaryArchSuffix
49	devel:libQt5Test$secondaryArchSuffix
50	devel:libQt5WebKit$secondaryArchSuffix
51	devel:libQt5WebKitWidgets$secondaryArchSuffix
52	devel:libQt5Widgets$secondaryArchSuffix
53	"
54BUILD_PREREQUIRES="
55	cmd:g++$secondaryArchSuffix
56	cmd:lrelease$secondaryArchSuffix >= 5
57	cmd:make
58	cmd:pkg_config$secondaryArchSuffix
59	cmd:qmake$secondaryArchSuffix >= 5
60	"
61
62defineDebugInfoPackage cutemarked$secondaryArchSuffix \
63	$appsDir/CuteMarkEd
64
65BUILD()
66{
67	qmake CuteMarkEd.pro
68	make $jobArgs
69}
70
71INSTALL()
72{
73	install -d $appsDir
74	install -T app/cutemarked $appsDir/CuteMarkEd
75
76	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
77	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
78	local MINOR="`echo "$portVersion" | cut -d. -f3`"
79	local INTERNAL="`echo "$portVersion" | cut -d. -f4`"
80	sed \
81		-e "s|@MAJOR@|$MAJOR|" \
82		-e "s|@MIDDLE@|$MIDDLE|" \
83		-e "s|@MINOR@|$MINOR|" \
84		-e "s|@INTERNAL@|$INTERNAL|" \
85		$portDir/additional-files/CuteMarkEd.rdef.in > CuteMarkEd.rdef
86
87	addResourcesToBinaries CuteMarkEd.rdef \
88		$appsDir/CuteMarkEd
89
90	addAppDeskbarSymlink $appsDir/CuteMarkEd
91}
92