Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pgerdt/qt5
Qt5 build setup, remove qmlog dependency, simplify header includes
- Loading branch information
Showing
20 changed files
with
324 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
LIBS += -liodata-qt5 | ||
|
||
QMAKE_EXTRA_COMPILERS += iodata_type_to_cxx iodata_type_to_h | ||
|
||
iodata_type_to_cxx.input = IODATA_TYPES | ||
iodata_type_to_cxx.output = iodata_${QMAKE_FILE_IN_BASE}.cpp | ||
iodata_type_to_cxx.variable_out = SOURCES | ||
iodata_type_to_cxx.commands = iodata-qt5-type-to-c++ ${QMAKE_FILE_IN} -o iodata_${QMAKE_FILE_IN_BASE}.cpp -d ${QMAKE_FILE_IN}.h | ||
|
||
iodata_type_to_h.input = IODATA_TYPES | ||
iodata_type_to_h.output = ${QMAKE_FILE_IN}.h | ||
iodata_type_to_h.variable_out = HEADERS | ||
iodata_type_to_h.commands = iodata-qt5-type-to-c++ ${QMAKE_FILE_IN} -o iodata_${QMAKE_FILE_IN_BASE}.cpp -d ${QMAKE_FILE_IN}.h | ||
|
||
# iodata-qt5-type-to-c++ ${QMAKE_FILE_IN} -d ${QMAKE_FILE_OUT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
%define _name iodata-qt5 | ||
Name: libiodata-qt5 | ||
Version: 0.19 | ||
Release: 1 | ||
Summary: Library for input/ouput data | ||
Group: System/System Control | ||
License: LGPLv2 | ||
URL: http://meego.gitorious.org/meego-middleware/iodata | ||
Source0: %{name}-%{version}.tar.bz2 | ||
|
||
BuildRequires: pkgconfig(Qt5Core) | ||
BuildRequires: bison | ||
BuildRequires: flex | ||
|
||
%description | ||
This package provides a library for writing and reading structured data. | ||
|
||
%package devel | ||
Summary: Development package for %{name} | ||
Group: Development/Libraries | ||
Requires: pkgconfig(Qt5Core) | ||
Requires: %{name} = %{version}-%{release} | ||
|
||
%description devel | ||
Provides header files for iodata library. | ||
|
||
%package tests | ||
Summary: Testcases for iodata library | ||
Group: Development/System | ||
Requires: testrunner-lite | ||
|
||
%description tests | ||
%{summary}. | ||
|
||
%prep | ||
%setup -q -n %{name}-%{version} | ||
|
||
%build | ||
export IODATA_VERSION=%version | ||
%qmake5 | ||
make | ||
|
||
%install | ||
%qmake_install | ||
install -d %{buildroot}/%{_datadir}/%{name}-tests/ | ||
mv %{buildroot}/%{_datadir}/%{_name}-tests/tests.xml %{buildroot}/%{_datadir}/%{name}-tests/tests.xml | ||
|
||
%post -p /sbin/ldconfig | ||
|
||
%postun -p /sbin/ldconfig | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%doc COPYING debian/changelog debian/copyright | ||
%{_libdir}/%{name}.so.* | ||
|
||
%files devel | ||
%defattr(-,root,root,-) | ||
%doc COPYING | ||
%{_bindir}/iodata-qt5-type-to-c++ | ||
%{_includedir}/iodata-qt5/* | ||
%{_libdir}/%{name}.so | ||
%{_datadir}/qt5/mkspecs/features/iodata-qt5.prf | ||
|
||
%files tests | ||
%defattr(-,root,root,-) | ||
%doc COPYING | ||
%{_bindir}/%{_name}-test | ||
%{_datadir}/%{name}-tests/tests.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* Fri Mar 04 2011 Tapio Rantala <ext-tapio.rantala@nokia.com> - 0.17-1 | ||
- New upstream version (FEA#5513) | ||
|
||
* Fri Jan 21 2011 Tapio Rantala <ext-tapio.rantala@nokia.com> - 0.0.16-1 | ||
- New upstream version (BMC#10590) | ||
|
||
* Wed Nov 24 2010 Tapio Rantala <ext-tapio.rantala@nokia.com> - 0.0.15-1 | ||
- New upstream version (BMC#10590) | ||
- Drop linklibs patch, not needed anymore | ||
- Conforms to upstream version 0.0.15-a | ||
|
||
* Mon Aug 23 2010 Tapio Rantala <ext-tapio.rantala@nokia.com> - 0.0.13-1 | ||
- Initial meego packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
%define _name iodata | ||
Name: libiodata | ||
Version: 0.19 | ||
Release: 1 | ||
Summary: Library for input/ouput data | ||
Group: System/System Control | ||
License: LGPLv2 | ||
URL: http://meego.gitorious.org/meego-middleware/iodata | ||
Source0: %{name}-%{version}.tar.bz2 | ||
|
||
BuildRequires: pkgconfig(QtCore) >= 4.5 | ||
BuildRequires: bison | ||
BuildRequires: flex | ||
|
||
%description | ||
This package provides a library for writing and reading structured data. | ||
|
||
%package devel | ||
Summary: Development package for %{name} | ||
Group: Development/Libraries | ||
Requires: pkgconfig(QtCore) >= 4.5 | ||
Requires: %{name} = %{version}-%{release} | ||
|
||
%description devel | ||
Provides header files for iodata library. | ||
|
||
%package tests | ||
Summary: Testcases for iodata library | ||
Group: Development/System | ||
Requires: testrunner-lite | ||
|
||
%description tests | ||
%{summary}. | ||
|
||
%prep | ||
%setup -q -n %{name}-%{version} | ||
|
||
%build | ||
export IODATA_VERSION=%version | ||
%qmake | ||
make | ||
|
||
%install | ||
%qmake_install | ||
install -d %{buildroot}/%{_datadir}/%{name}-tests/ | ||
mv %{buildroot}/%{_datadir}/%{_name}-tests/tests.xml %{buildroot}/%{_datadir}/%{name}-tests/tests.xml | ||
|
||
%post -p /sbin/ldconfig | ||
|
||
%postun -p /sbin/ldconfig | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%doc COPYING debian/changelog debian/copyright | ||
%{_libdir}/%{name}.so.* | ||
|
||
%files devel | ||
%defattr(-,root,root,-) | ||
%doc COPYING | ||
%{_bindir}/iodata-type-to-c++ | ||
%{_includedir}/iodata/* | ||
%{_libdir}/%{name}.so | ||
%{_datadir}/qt4/mkspecs/features/iodata.prf | ||
|
||
%files tests | ||
%defattr(-,root,root,-) | ||
%doc COPYING | ||
%{_bindir}/%{_name}-test | ||
%{_datadir}/%{name}-tests/tests.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
#include <QtGlobal> | ||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) | ||
#include <iodata-qt5/iodata.h> | ||
#else | ||
#include <iodata/iodata.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/*-----------------------------------------------------------------------+ | ||
| | | ||
| Copyright (C) 2013 Jolla Ltd. | | ||
| Contact: Petri M. Gerdt <petri.gerdt@jollamobile.com> | | ||
| | | ||
| This file is part of Iodata | | ||
| | | ||
| Iodata is free software; you can redistribute it and/or modify | | ||
| it under the terms of the GNU Lesser General Public License | | ||
| version 2.1 as published by the Free Software Foundation. | | ||
| | | ||
| Iodata is distributed in the hope that it will be useful, but | | ||
| WITHOUT ANY WARRANTY; without even the implied warranty of | | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | ||
| See the GNU Lesser General Public License for more details. | | ||
| | | ||
| You should have received a copy of the GNU Lesser General Public | | ||
| License along with Iodata. If not, see http://www.gnu.org/licenses/ | | ||
| | | ||
+-----------------------------------------------------------------------*/ | ||
|
||
#ifndef LOG_H | ||
#define LOG_H | ||
|
||
#include <QtGlobal> | ||
#include <cassert> | ||
#include <cstdio> | ||
|
||
#define LOG_NONE 0 | ||
#define LOG_ASSERT 1 | ||
#define LOG_CRITICAL 2 | ||
#define LOG_ERROR 3 | ||
#define LOG_WARNING 4 | ||
#define LOG_NOTICE 5 | ||
#define LOG_INFO 6 | ||
#define LOG_DEBUG 7 | ||
#define LOG_FULL LOG_DEBUG | ||
|
||
#define LOG_LEVEL LOG_WARNING | ||
|
||
#if LOG_LEVEL >= LOG_DEBUG | ||
# define log_debug(FMT,ARGS...) \ | ||
do { \ | ||
printf("DEBUG: %s:%d: %s", __FILE__, __LINE__, Q_FUNC_INFO); \ | ||
if (strlen(""FMT) > 0) \ | ||
printf(":\n- "FMT"\n", ## ARGS); \ | ||
else \ | ||
printf("\n"); \ | ||
} while(0) | ||
#else | ||
# define log_debug(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_INFO | ||
# define log_info(FMT,ARGS...) do { fprintf(stderr, "INFO: "FMT"\n", ## ARGS); } while(0) | ||
#else | ||
# define log_info(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_INFO | ||
# define log_notice(FMT,ARGS...) do { fprintf(stderr, "NOTICE: "FMT"\n", ## ARGS); } while(0) | ||
#else | ||
# define log_notice(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_WARNING | ||
# define log_warning(FMT,ARGS...) do { fprintf(stderr, "WARNING: "FMT"\n", ## ARGS); } while(0) | ||
#else | ||
# define log_warning(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_ERROR | ||
# define log_error(FMT,ARGS...) do { fprintf(stderr, "ERROR: "FMT"\n", ## ARGS); } while(0) | ||
#else | ||
# define log_error(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_CRITICAL | ||
# define log_critical(FMT,ARGS...) do { fprintf(stderr, "CRITICAL: "FMT"\n", ## ARGS); } while(0) | ||
#else | ||
# define log_critical(FMT,ARGS...) do { } while(0) | ||
#endif | ||
|
||
#if LOG_LEVEL >= LOG_ASSERT | ||
# define log_assert(COND, ARGS...) \ | ||
do { \ | ||
if (!(COND)) \ | ||
fprintf(stderr, "ASSERT: "ARGS); \ | ||
assert(COND); \ | ||
} while(0) | ||
# define log_abort(FMT,ARGS...) do { fprintf(stderr, "ABORT: "FMT"\n", ## ARGS); assert(0); } while(0) | ||
#else | ||
# define log_assert(COND, ARGS...) do { assert(COND); } while(0) | ||
# define log_abort(FMT,ARGS...) do { assert(0); } while(0) | ||
#endif | ||
|
||
#endif // LOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
#include <QtGlobal> | ||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) | ||
#include <iodata-qt5/storage.h> | ||
#else | ||
#include <iodata/storage.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
#include <QtGlobal> | ||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) | ||
#include <iodata-qt5/validator.h> | ||
#else | ||
#include <iodata/validator.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.