You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2025/09/11 19:33:52 UTC
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
nickva commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2342144099
##########
src/couch/rebar.config.script:
##########
@@ -151,6 +151,25 @@ ProperConfig = case code:lib_dir(proper) of
_ -> [{d, 'WITH_PROPER'}]
end.
+DpkgArchitectureCmd = "dpkg-architecture -q DEB_HOST_MULTIARCH".
+GenericMozJSIncludePaths = "-I/usr/include/mozjs-" ++ SMVsn ++ " -I/usr/local/include/mozjs-" ++ SMVsn.
+GenericMozJSLibPaths = "-L/usr/local/lib -L/opt/homebrew/lib".
+
+WithDpkgArchitecture = case os:find_executable("dpkg-architecture") of
+ false -> false;
+ _ -> true
+end.
+
+MozJSIncludePath = case WithDpkgArchitecture of
+ false -> GenericMozJSIncludePaths;
+ true -> GenericMozJSIncludePaths ++ " -I/usr/include/" ++ string:strip(os:cmd(DpkgArchitectureCmd), right, $\n) ++ "/mozjs-" ++ SMVsn
Review Comment:
strip is deprecated, use string:trim instead
```
string:trim("\n foo \t \n") -> "foo"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org