mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-18 23:38:57 -04:00
add nixnote(an evernote clone for linux)
This commit is contained in:
parent
07dd4089b4
commit
7557b5b1c0
4
app-misc/nixnote/Manifest
Normal file
4
app-misc/nixnote/Manifest
Normal file
@ -0,0 +1,4 @@
|
||||
DIST nixnote-1.6_amd64.tar.gz 53989217 SHA256 781f8b9cbe3e1137b62d4dbb76670b3e2d5a20403b04b3767e03a2e89dba860e
|
||||
DIST nixnote-1.6_i386.tar.gz 53529229 SHA256 50be711e33d37fd43590845718e5e5710cc48a5f7f745df8990b0f792da3a7da
|
||||
DIST nixnote2-2.0-beta4.tar.gz 1927064 SHA256 902b5bb350b72356415e2c2c96be706ba7b68b7e055b64ea48197b83d42581b6
|
||||
DIST nixnote2-2.0-beta5.tar.gz 1958188 SHA256 1c4f181517be252dca4346e84c937ff4e4c3d38c0e18ffb13c52a44cf7d15aca
|
27
app-misc/nixnote/files/nixnote-2.0_beta5-Qt5.patch
Normal file
27
app-misc/nixnote/files/nixnote-2.0_beta5-Qt5.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/gui/widgetpanel.cpp b/gui/widgetpanel.cpp
|
||||
index b70523a..385e069 100644
|
||||
--- a/gui/widgetpanel.cpp
|
||||
+++ b/gui/widgetpanel.cpp
|
||||
@@ -149,6 +149,7 @@ void WidgetPanel::dragEnterHandler(QDragEnterEvent *event) {
|
||||
void WidgetPanel::dragMoveHandler(QDragMoveEvent *event) {
|
||||
|
||||
//QPoint pos = event->source()->mapToGlobal(event->pos());
|
||||
+ QWidget *source = qobject_cast<QWidget *>(event->source());
|
||||
QPoint pos = QCursor::pos();
|
||||
pos = this->mapFromGlobal(pos);
|
||||
int mouse = QCursor::pos().y();
|
||||
@@ -170,10 +171,10 @@ void WidgetPanel::dragMoveHandler(QDragMoveEvent *event) {
|
||||
if (pos.y()>priorMousePosition.y()) {
|
||||
timer.stop();
|
||||
scrollUp=false;
|
||||
- if (event->source()->objectName()=="Tags") {
|
||||
- int bottom = event->source()->mapToGlobal(event->source()->visibleRegion().boundingRect().bottomLeft()).y();
|
||||
- int actualBottom = event->source()->mapToGlobal(event->source()->geometry().bottomLeft()).y();
|
||||
- bool bottomVisible = this->visibleRegion().contains(event->source()->geometry().bottomLeft());
|
||||
+ if (source->objectName()=="Tags") {
|
||||
+ int bottom = source->mapToGlobal(source->visibleRegion().boundingRect().bottomLeft()).y();
|
||||
+ int actualBottom = source->mapToGlobal(source->geometry().bottomLeft()).y();
|
||||
+ bool bottomVisible = this->visibleRegion().contains(source->geometry().bottomLeft());
|
||||
if (bottom-mouse < 50 && bottom < actualBottom && !bottomVisible) {
|
||||
timer.start(5);
|
||||
}
|
26
app-misc/nixnote/nixnote-1.6.ebuild
Normal file
26
app-misc/nixnote/nixnote-1.6.ebuild
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="An open source Evernote clone"
|
||||
HOMEPAGE="http://nevernote.sourceforge.net/index.htm"
|
||||
SRC_URI="x86? ( mirror://sourceforge/nevernote/${P}_i386.tar.gz )
|
||||
amd64? ( mirror://sourceforge/nevernote/${P}_amd64.tar.gz )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="1"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=virtual/jdk-1.5
|
||||
media-libs/libpng:1.2"
|
||||
|
||||
S="${PN}"
|
||||
src_install() {
|
||||
cp -rf "${S}/usr" "${D}/"
|
||||
}
|
87
app-misc/nixnote/nixnote-2.0.9999.ebuild
Normal file
87
app-misc/nixnote/nixnote-2.0.9999.ebuild
Normal file
@ -0,0 +1,87 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit qmake-utils versionator
|
||||
|
||||
|
||||
if [[ "${PV}" == *9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/baumgarr/${PN}2.git"
|
||||
else
|
||||
MY_PV="$(replace_version_separator 2 '-')"
|
||||
SRC_URI="https://github.com/baumgarr/${PN}2/archive/v${MY_PV}.tar.gz -> ${PN}2-${MY_PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}2-${MY_PV}"
|
||||
fi
|
||||
|
||||
SLOT="2"
|
||||
DESCRIPTION="Nixnote - A clone of Evernote for Linux"
|
||||
HOMEPAGE="http://sourceforge.net/projects/nevernote/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
[[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~x86"
|
||||
IUSE="qt4 qt5 +opencv3"
|
||||
|
||||
REQUIRED_USE="^^ ( qt4 qt5 )
|
||||
qt5? ( opencv3 )
|
||||
"
|
||||
|
||||
DEPEND="dev-libs/boost
|
||||
app-text/hunspell
|
||||
|
||||
qt4? (
|
||||
app-text/poppler[qt4]
|
||||
dev-qt/qtwebkit:4
|
||||
dev-qt/qtcore:4
|
||||
dev-qt/qtgui:4
|
||||
dev-qt/qtsql:4
|
||||
opencv3? ( media-libs/opencv:0/3.0[qt4] )
|
||||
!opencv3? ( media-libs/opencv:0/2.4[qt4] )
|
||||
)
|
||||
qt5? (
|
||||
app-text/poppler[qt5]
|
||||
dev-qt/qtwebkit:5
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtsql:5
|
||||
media-libs/opencv[qt5]
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
app-text/htmltidy"
|
||||
|
||||
src_prepare() {
|
||||
|
||||
# fix VideoCapture undefined reference error with opencv-3
|
||||
if use opencv3; then
|
||||
sed -i 's/LIBS += /LIBS += -lopencv_videoio/g' NixNote2.pro
|
||||
sed -i '/\#include "opencv\/cv.h"/i\#include "opencv2\/videoio.hpp"' dialog/webcamcapturedialog.h
|
||||
fi
|
||||
|
||||
lupdate -pro NixNote2.pro -no-obsolete || die
|
||||
lrelease NixNote2.pro || die
|
||||
|
||||
if use qt4; then
|
||||
eqmake4 NixNote2.pro
|
||||
fi
|
||||
if use qt5; then
|
||||
eqmake5 NixNote2.pro
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/nixnote2
|
||||
doins -r certs help images java qss translations changelog.txt license.html shortcuts.txt *.ini
|
||||
|
||||
rm -r ${D}/usr/share/nixnote2/translations/*.ts
|
||||
|
||||
dobin nixnote2
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins nixnote2.desktop
|
||||
|
||||
doman ${S}/man/nixnote2.1
|
||||
|
||||
}
|
89
app-misc/nixnote/nixnote-2.0_beta5.ebuild
Normal file
89
app-misc/nixnote/nixnote-2.0_beta5.ebuild
Normal file
@ -0,0 +1,89 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit qmake-utils versionator
|
||||
|
||||
if [[ "${PV}" == *9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/baumgarr/${PN}2.git"
|
||||
else
|
||||
MY_PV="$(replace_version_separator 2 '-')"
|
||||
SRC_URI="https://github.com/baumgarr/${PN}2/archive/v${MY_PV}.tar.gz -> ${PN}2-${MY_PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}2-${MY_PV}"
|
||||
fi
|
||||
|
||||
SLOT="2"
|
||||
DESCRIPTION="Nixnote - A clone of Evernote for Linux"
|
||||
HOMEPAGE="http://sourceforge.net/projects/nevernote/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
[[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~x86"
|
||||
IUSE="qt4 qt5 +opencv3"
|
||||
|
||||
REQUIRED_USE="^^ ( qt4 qt5 )
|
||||
qt5? ( opencv3 )
|
||||
"
|
||||
|
||||
DEPEND="dev-libs/boost
|
||||
app-text/hunspell
|
||||
|
||||
qt4? (
|
||||
app-text/poppler[qt4]
|
||||
dev-qt/qtwebkit:4
|
||||
dev-qt/qtcore:4
|
||||
dev-qt/qtgui:4
|
||||
dev-qt/qtsql:4
|
||||
opencv3? ( media-libs/opencv:0/3.0[qt4] )
|
||||
!opencv3? ( media-libs/opencv:0/2.4[qt4] )
|
||||
)
|
||||
qt5? (
|
||||
app-text/poppler[qt5]
|
||||
dev-qt/qtwebkit:5
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtsql:5
|
||||
media-libs/opencv[qt5]
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
app-text/htmltidy"
|
||||
|
||||
src_prepare() {
|
||||
|
||||
# fix QDragEvent::source() issue with Qt5
|
||||
epatch ${FILESDIR}/${PN}-2.0_beta5-Qt5.patch
|
||||
|
||||
# fix VideoCapture undefined reference error with opencv-3
|
||||
if use opencv3; then
|
||||
sed -i 's/LIBS += /LIBS += -lopencv_videoio/g' NixNote2.pro
|
||||
sed -i '/\#include "opencv\/cv.h"/i\#include "opencv2\/videoio.hpp"' dialog/webcamcapturedialog.h
|
||||
fi
|
||||
|
||||
lupdate -pro NixNote2.pro -no-obsolete || die
|
||||
lrelease NixNote2.pro || die
|
||||
|
||||
if use qt4; then
|
||||
eqmake4 NixNote2.pro
|
||||
fi
|
||||
if use qt5; then
|
||||
eqmake5 NixNote2.pro
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/nixnote2
|
||||
doins -r certs help images java qss translations changelog.txt license.html shortcuts.txt *.ini
|
||||
|
||||
rm -r ${D}/usr/share/nixnote2/translations/*.ts
|
||||
|
||||
dobin nixnote2
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins nixnote2.desktop
|
||||
|
||||
doman ${S}/man/nixnote2.1
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user