bookmarkconverter: fix build on gcc5.

This commit is contained in:
Jerome Duval
2017-04-12 21:10:32 +02:00
parent 3970d18047
commit 9b9f2805ce
2 changed files with 30 additions and 11 deletions

View File

@@ -2,27 +2,21 @@ SUMMARY="A tool to convert browser bookmarks"
DESCRIPTION="This tool converts bookmarks between QupZilla and WebPositive. \
It can also convert WebPositive bookmarks to HTML and Chrome as intermediate \
formats."
HOMEPAGE="http://github.com/HaikuArchives/BookmarkConverter"
COPYRIGHT="2015 Markus Himmel"
LICENSE="MIT"
REVISION="3"
gitRevision="d1a4f53b4ccb33d9fd0f9818c8fe05b5689c6251"
SOURCE_URI="https://github.com/HaikuArchives/BookmarkConverter/archive/$gitRevision.zip"
SOURCE_DIR="BookmarkConverter-$gitRevision"
CHECKSUM_SHA256="44c26bff324d00fe19a51824cfd2e797ebc0d0c5f27a886e5c69851508ebb3ea"
REVISION="2"
LICENSE="MIT"
COPYRIGHT="
2015 Markus Himmel
"
ARCHITECTURES="x86_gcc2 ?x86 ?ppc"
ARCHITECTURES="x86_gcc2 ?x86 x86_64"
PROVIDES="
bookmarkconverter = $portVersion
cmd:bookmarkconverter = $portVersion
"
REQUIRES="
haiku
"
@@ -31,7 +25,6 @@ BUILD_REQUIRES="
haiku_devel
makefile_engine
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc

View File

@@ -0,0 +1,26 @@
From 57663e3684c59ceab22b60c63ef51fcb536d9b78 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 12 Apr 2017 21:10:09 +0200
Subject: fix build on gcc5
diff --git a/src/main.cpp b/src/main.cpp
index b670c7a..ecbd0c5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -92,8 +92,10 @@ int main(int argc, char* argv[])
if (input == NULL) {
BDirectory test(paths[0].String());
- input = (test.InitCheck() == B_OK) ?
- new BeInput() : new QupZillaInput();
+ if (test.InitCheck() == B_OK)
+ input = new BeInput();
+ else
+ input = new QupZillaInput();
}
if (output == NULL)
--
2.11.0