Last active
August 12, 2017 13:22
-
-
Save xiamaz/d73327df155f4522367ef8de48f72203 to your computer and use it in GitHub Desktop.
Fix curlbuild error in polybar
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
diff -ura a/src/utils/http.cpp b/src/utils/http.cpp | |
--- a/src/utils/http.cpp 2017-08-06 14:33:25.826861007 +0200 | |
+++ b/src/utils/http.cpp 2017-08-06 14:33:46.873532772 +0200 | |
@@ -1,5 +1,4 @@ | |
#include <curl/curl.h> | |
-#include <curl/curlbuild.h> | |
#include <curl/easy.h> | |
#include <sstream> |
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
# Maintainer: Michael Carlberg <[email protected]> | |
# Contributor: Michael Carlberg <[email protected]> | |
pkgname=polybar | |
pkgver=3.0.5 | |
pkgrel=2 | |
pkgdesc="A fast and easy-to-use status bar" | |
arch=("i686" "x86_64") | |
url="https://github.com/jaagr/polybar" | |
license=("MIT") | |
depends=("cairo" "xcb-util-image" "xcb-util-wm" "xcb-util-xrm") | |
optdepends=("alsa-lib: volume module support" | |
"libmpdclient: mpd module support" | |
"wireless_tools: network module support" | |
"jsoncpp: i3 module support" | |
"i3ipc-glib-git: i3 module support" | |
"ttf-unifont: Font used in example config" | |
"siji-git: Font used in example config" | |
"curl: github module support") | |
makedepends=("clang" "cmake" "git" "python" "python2" "pkg-config") | |
conflicts=("polybar-git") | |
install="${pkgname}.install" | |
source=("${pkgname}::git+${url}.git#tag=${pkgver}" "curlbuild.patch") | |
md5sums=('SKIP' | |
'653ab1fc31142527535209df7fae251a') | |
prepare() { | |
git -C "${pkgname}" submodule update --init --recursive | |
cd ${pkgname} | |
patch -p1 -i ${srcdir}/curlbuild.patch | |
mkdir -p "${srcdir}/${pkgname}/build" | |
} | |
build() { | |
cd "${srcdir}/${pkgname}/build" || exit 1 | |
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" .. | |
cmake --build . | |
} | |
package() { | |
cmake --build "${pkgname}/build" --target install -- DESTDIR="${pkgdir}" | |
install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} |
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
post_install() { | |
cat << EOF | |
Get started with the example configuration: | |
$ install -Dm644 /usr/share/doc/polybar/config \$HOME/.config/polybar/config | |
$ polybar example | |
For more information, see https://github.com/jaagr/polybar/wiki | |
EOF | |
} | |
post_upgrade() { | |
[ "$(vercmp "$2" "2.5.1-1")" = "-1" ] || exit 0 | |
cat << EOF | |
The % suffix has been removed from percentage tokens. | |
The suffix is instead added by the user, for example: | |
format-charging = Capacity %percentage%% | |
-- jaagr | |
EOF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment